From 16fdb0a5c5ab24d67aaf595505a19e3655d5608f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 10 Apr 1999 17:03:32 +0000 Subject: [PATCH] fix comment --- parse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/parse.c b/parse.c index c1b0d94ac..f3b64e7bc 100644 --- a/parse.c +++ b/parse.c @@ -308,10 +308,8 @@ command_matches(cmnd, user_args, path, sudoers_args) strcpy(buf, path); strcat(buf, dent->d_name); - /* only stat if basenames are not the same */ - if (strcmp(cmnd_base, dent->d_name)) - continue; - if (stat(buf, &pst) == -1) + /* only stat if basenames are the same */ + if (strcmp(cmnd_base, dent->d_name) != 0 || stat(buf, &pst) == -1) continue; if (cst.st_dev == pst.st_dev && cst.st_ino == pst.st_ino) { if (cmnd_safe) -- 2.50.1