diff --git a/logger.c b/logger.c index 32bea50..a0923f8 100644 --- a/logger.c +++ b/logger.c @@ -77,10 +77,10 @@ logger_lograw(int priority, const char *msg) if (priority < 0 || priority > LOG_PRIMASK) priority = INTERNAL_NOPRI; - if (logger_fd < 0) { + if (logger_fd == -1) { logger_reopen(); } - if (logger_fd < 0) { + if (logger_fd == -1) { return; } fp = (logger_logfile == NULL) ? stdout : fopen(logger_logfile, "a"); diff --git a/main.c b/main.c index 64f3624..e4508ca 100644 --- a/main.c +++ b/main.c @@ -154,7 +154,7 @@ write_to_file(const char *path, char *buf, size_t count) { int fd; fd = open(path, O_WRONLY | O_CREAT, 0444); - if (fd < 0) { + if (fd == -1) { return -1; } if (safe_write(fd, buf, count, 3) != count) { @@ -168,7 +168,7 @@ read_from_file(const char *path, char *buf, size_t count) { int fd; fd = open(path, O_RDONLY); - if (fd < 0) { + if (fd == -1) { return -1; } if (safe_read(fd, buf, count) != count) { diff --git a/version.h b/version.h index a4ec878..643e755 100644 --- a/version.h +++ b/version.h @@ -2,6 +2,6 @@ #ifndef VERSION_H #define VERSION_H -const char *the_version = "0.1.16.1.g1c25a2d"; +const char *the_version = "0.1.16.2.g5aae3bf"; #endif