]> git.tuebingen.mpg.de Git - adu.git/commitdiff
select.c: Fix two return values.
authorAndre Noll <maan@systemlinux.org>
Sat, 8 Nov 2008 17:26:24 +0000 (18:26 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 8 Nov 2008 17:26:24 +0000 (18:26 +0100)
ERRNO_TO_ERROR() takes a _positive_ error code.

select.c

index 152e4b98667c69fe68d5a0a53fb53b2f90b677ab..ded4a095ca751574bbfa9153d3ec61ad7aa32bb2 100644 (file)
--- a/select.c
+++ b/select.c
@@ -583,7 +583,7 @@ static int print_statistics(struct format_info *fi)
                        return print_user_summary(fi);
        };
        ERROR_LOG("bad select mode\n");
                        return print_user_summary(fi);
        };
        ERROR_LOG("bad select mode\n");
-       return -ERRNO_TO_ERROR(-EINVAL);
+       return -ERRNO_TO_ERROR(EINVAL);
 }
 
 static int open_pipe(char *path)
 }
 
 static int open_pipe(char *path)
@@ -734,7 +734,7 @@ static int setup_format_string(char *fmt, struct format_info **fi)
                break;
        default:
                ERROR_LOG("bad select mode\n");
                break;
        default:
                ERROR_LOG("bad select mode\n");
-               return -ERRNO_TO_ERROR(-EINVAL);
+               return -ERRNO_TO_ERROR(EINVAL);
        };
        INFO_LOG("format string: %s\n", fmt);
        return parse_format_string(fmt, atoms, fi);
        };
        INFO_LOG("format string: %s\n", fmt);
        return parse_format_string(fmt, atoms, fi);