]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Keep return value check simple
[colorize.git] / colorize.c
index c7fa2bb7dcf1d6029177f08eaa271ca71b0f4a8b..7babb864816adbb7940c7bd1defafb218ce72bda 100644 (file)
@@ -60,7 +60,7 @@
 
 #define free_null(ptr) free_wrap((void **)&ptr)
 
-#if BUF_SIZE <= 0 || BUF_SIZE > 65536
+#if defined(BUF_SIZE) && (BUF_SIZE <= 0 || BUF_SIZE > 65536)
 # undef BUF_SIZE
 #endif
 #ifndef BUF_SIZE
@@ -499,7 +499,7 @@ process_args (unsigned int arg_cnt, char **arg_strings, bool *bold, const struct
 
     /* Ensure that we don't fail if there's a file with one or more
        color names in its path.  */
-    if (ret != -1)
+    if (ret == 0) /* success */
       {
         bool have_file;
         unsigned int c;