]> git.meshlink.io Git - utcp/blobdiff - test.c
Use '== -1' to check for errors from functions.
[utcp] / test.c
diff --git a/test.c b/test.c
index b5d64a3eb3ba698c8c763010131fbd386df5fbd0..75fce79dfd16d8697f32544a5e0a64c98e448aed 100644 (file)
--- a/test.c
+++ b/test.c
@@ -73,7 +73,7 @@ int main(int argc, char *argv[]) {
                return 1;
 
        int s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-       if(s < 0)
+       if(s == -1)
                return 1;
 
        if(server) {
@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
                                dir &= ~1;
                                if(c)
                                        utcp_shutdown(c, SHUT_WR);
-                               if(len < 0)
+                               if(len == -1)
                                        break;
                                else
                                        continue;