]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - src/libadacl.c
safe_open_ex: remove redundant (pathname == NULL) check.
[apply-default-acl.git] / 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;
   }