Imported Upstream version 1.7.6p1
[debian/sudo] / parse.c
diff --git a/parse.c b/parse.c
index 97aba79ccaa4e1f3815a9fe14e2d8239e73c6e30..acf8e5fdc8145b4a213558d446e47d917529a0bc 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -83,9 +83,9 @@ sudo_file_open(nss)
     struct sudo_nss *nss;
 {
     if (def_ignore_local_sudoers)
-       return(-1);
+       return -1;
     nss->handle = open_sudoers(_PATH_SUDOERS, FALSE, NULL);
-    return(nss->handle ? 0 : -1);
+    return nss->handle ? 0 : -1;
 }
 
 int
@@ -99,7 +99,7 @@ sudo_file_close(nss)
        nss->handle = NULL;
        yyin = NULL;
     }
-    return(0);
+    return 0;
 }
 
 /*
@@ -110,16 +110,16 @@ sudo_file_parse(nss)
     struct sudo_nss *nss;
 {
     if (nss->handle == NULL)
-       return(-1);
+       return -1;
 
     init_parser(_PATH_SUDOERS, 0);
     yyin = nss->handle;
     if (yyparse() != 0 || parse_error) {
        log_error(NO_EXIT, "parse error in %s near line %d",
            errorfile, errorlineno);
-       return(-1);
+       return -1;
     }
-    return(0);
+    return 0;
 }
 
 /*
@@ -130,11 +130,11 @@ sudo_file_setdefs(nss)
     struct sudo_nss *nss;
 {
     if (nss->handle == NULL)
-       return(-1);
+       return -1;
 
     if (!update_defaults(SETDEF_GENERIC|SETDEF_HOST|SETDEF_USER))
-       return(-1);
-    return(0);
+       return -1;
+    return 0;
 }
 
 /*
@@ -154,7 +154,7 @@ sudo_file_lookup(nss, validated, pwflag)
     struct userspec *us;
 
     if (nss->handle == NULL)
-       return(validated);
+       return validated;
 
     /*
      * Only check the actual command if pwflag is not set.
@@ -200,7 +200,7 @@ sudo_file_lookup(nss, validated, pwflag)
            SET(validated, FLAG_CHECK_USER);
        else if (pwcheck == never || nopass == TRUE)
            def_authenticate = FALSE;
-       return(validated);
+       return validated;
     }
 
     /* Need to be runas user while stat'ing things. */
@@ -259,7 +259,7 @@ sudo_file_lookup(nss, validated, pwflag)
        CLR(validated, VALIDATE_OK);
     }
     set_perms(PERM_ROOT);
-    return(validated);
+    return validated;
 }
 
 #define        TAG_CHANGED(t) \
@@ -361,7 +361,7 @@ sudo_file_display_priv_short(pw, us, lbuf)
        }
        lbuf_append(lbuf, "\n", NULL);
     }
-    return(nfound);
+    return nfound;
 }
 
 static int
@@ -416,7 +416,7 @@ sudo_file_display_priv_long(pw, us, lbuf)
            nfound++;
        }
     }
-    return(nfound);
+    return nfound;
 }
 
 int
@@ -441,7 +441,7 @@ sudo_file_display_privs(nss, pw, lbuf)
            nfound += sudo_file_display_priv_short(pw, us, lbuf);
     }
 done:
-    return(nfound);
+    return nfound;
 }
 
 /*
@@ -495,7 +495,7 @@ sudo_file_display_defaults(nss, pw, lbuf)
        nfound++;
     }
 done:
-    return(nfound);
+    return nfound;
 }
 
 /*
@@ -513,7 +513,7 @@ sudo_file_display_bound_defaults(nss, pw, lbuf)
     nfound += display_bound_defaults(DEFAULTS_RUNAS, lbuf);
     nfound += display_bound_defaults(DEFAULTS_CMND, lbuf);
 
-    return(nfound);
+    return nfound;
 }
 
 /*
@@ -551,7 +551,7 @@ display_bound_defaults(dtype, lbuf)
            dsep = "!";
            break;
        default:
-           return(-1);
+           return -1;
     }
     /* printf("Per-%s Defaults entries:\n", dname); */
     tq_foreach_fwd(&defaults, d) {
@@ -579,7 +579,7 @@ display_bound_defaults(dtype, lbuf)
            lbuf_append(lbuf, d->op == FALSE ? "!" : "", d->var, NULL);
     }
 
-    return(nfound);
+    return nfound;
 }
 
 int
@@ -612,8 +612,7 @@ sudo_file_display_cmnd(nss, pw)
                if (runas_match == ALLOW) {
                    cmnd_match = cmnd_matches(cs->cmnd);
                    if (cmnd_match != UNSPEC) {
-                       match = host_match && runas_match ?
-                           cs->cmnd : NULL;
+                       match = host_match && runas_match ? cs->cmnd : NULL;
                        goto matched;
                    }
                }
@@ -627,7 +626,7 @@ sudo_file_display_cmnd(nss, pw)
        rval = 0;
     }
 done:
-    return(rval);
+    return rval;
 }
 
 /*