removed warning "comparison between signed and unsigned".
author"Vladimir N. Oleynik" <dzo@simtreas.ru>
Mon, 30 Jan 2006 14:02:06 +0000 (14:02 -0000)
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>
Mon, 30 Jan 2006 14:02:06 +0000 (14:02 -0000)
procps/ps.c

index b423b06ceb3bf591f7556e97ef205902c3d5c69b..9dd0e036e93f5564a72c789b0d81edb4420587d5 100644 (file)
@@ -111,14 +111,14 @@ extern int ps_main(int argc, char **argv)
                if(namecmd && namecmd[0]) {
                        if(i < 0)
                                i = 0;
-                       if(strlen(namecmd) > i)
+                       if(strlen(namecmd) > (size_t)i)
                                namecmd[i] = 0;
                        printf("%s\n", namecmd);
                } else {
                        namecmd = p->short_cmd;
                        if(i < 2)
                                i = 2;
-                       if(strlen(namecmd) > (i-2))
+                       if(strlen(namecmd) > ((size_t)i-2))
                                namecmd[i-2] = 0;
                        printf("[%s]\n", namecmd);
                }