]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Call the correct function.
authorMichael Rothwell <mrothwell@google.com>
Fri, 30 Sep 2016 16:46:48 +0000 (09:46 -0700)
committerMichael Rothwell <mrothwell@google.com>
Fri, 30 Sep 2016 16:46:48 +0000 (09:46 -0700)
nss/nss_borg/borg-pwd.c

index 4f6c5443e8003b6d50724a03037f2aa70301b31c..9b68b9bec72774e92dbea327fbc0833af710e6d7 100644 (file)
@@ -87,12 +87,12 @@ static enum nss_status _nss_borg_getpwent_r_locked(struct passwd *result,
 
   enum nss_status ret;
 
-  if (f != NULL
-      && fgetpwent_r(f, result, buffer, buflen, &result) == 0) {
+  if (
+      f != NULL && (fgetpwent_r(f, result, buffer, buflen, &result) == 0)) {
     DEBUG("Returning borg user %d:%s\n", result->pw_uid, result->pw_name);
     ret = NSS_STATUS_SUCCESS;
-  } else if (fb != NULL
-             && getpwent_r(fb, result, buffer, buflen, &result) == 0) {
+  } else if (
+      fb != NULL && (fgetpwent_r(fb, result, buffer, buflen, &result) == 0)) {
     DEBUG("Returning base user %d:%s\n", result->pw_uid, result->pw_name);
     ret = NSS_STATUS_SUCCESS;
   } else {