From 0b4ff086871b13edb9da3bda67ac4b6f710e73dd Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 27 Feb 2018 14:21:11 -0500 Subject: [PATCH] safe_open_ex: remove redundant (pathname == NULL) check. --- src/libadacl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.43.2