]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
safe_open_ex: remove redundant (pathname == NULL) check.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 27 Feb 2018 19:21:11 +0000 (14:21 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 27 Feb 2018 19:21:11 +0000 (14:21 -0500)
src/libadacl.c

index 01cb4adaea9ebef67d9358b6ac1b5555dc452500..a1923601669b66efb0ffa45e62a9b73695354ddb 100644 (file)
@@ -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;
   }