From: Michael Orlitzky Date: Tue, 27 Feb 2018 19:21:11 +0000 (-0500) Subject: safe_open_ex: remove redundant (pathname == NULL) check. X-Git-Tag: v0.1.3~2 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=0b4ff086871b13edb9da3bda67ac4b6f710e73dd;p=apply-default-acl.git safe_open_ex: remove redundant (pathname == NULL) check. --- diff --git a/src/libadacl.c b/src/libadacl.c index 01cb4ad..a192360 100644 --- a/src/libadacl.c +++ b/src/libadacl.c @@ -56,7 +56,9 @@ * and @c OPEN_ERROR if not. */ int safe_open_ex(int at_fd, char* pathname, int flags) { - if (pathname != NULL && strlen(pathname) == 0) { + /* We're only called by safe_open(), so pathname is guaranteed to be + non-NULL */ + if (strlen(pathname) == 0) { /* Oops, went one level to deep with nothing to do. */ return at_fd; }