Print this page
10075 make usr/src/tools smatch clean

@@ -20,10 +20,13 @@
  */
 /*
  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <strings.h>
 #include <sys/param.h>

@@ -101,17 +104,17 @@
         gid_t   grp = (gid_t)-1;
         uid_t   own = (uid_t)-1;
 
         if (group) {
                 grp = stdfind(group, groupnames);
-                if (grp < 0)
+                if (grp == (gid_t)-1)
                         (void) fprintf(stderr, "unknown group(%s)\n", group);
         }
 
         if (owner) {
                 own = stdfind(owner, usernames);
-                if (own < 0) {
+                if (own == (uid_t)-1) {
                         (void) fprintf(stderr, "unknown owner(%s)\n", owner);
                         exit(1);
                 }
 
         }