]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
src/libadacl.c: remove redundant empty pathname checks from safe_open().
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Mar 2018 23:20:09 +0000 (18:20 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Mar 2018 23:20:09 +0000 (18:20 -0500)
src/libadacl.c

index 20bb715ea7b5e429911061511f09226bf065e2ce..30a39f2704883a60429abd279a05c99caeb9b0c9 100644 (file)
@@ -127,7 +127,7 @@ int safe_open_ex(int at_fd, char* pathname, int flags) {
  *   and @c OPEN_ERROR if not.
  */
 int safe_open(const char* pathname, int flags) {
-  if (pathname == NULL || strlen(pathname) == 0 || pathname[0] == '\0') {
+  if (pathname == NULL) {
     errno = EINVAL;
     perror("safe_open (args)");
     return OPEN_ERROR;