public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] Call the correct function.
@ 2021-08-27 23:23 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-27 23:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4e15d3291c823bda57c82eda964b0427cc95d804

commit 4e15d3291c823bda57c82eda964b0427cc95d804
Author: Michael Rothwell <mrothwell@google.com>
Date:   Fri Sep 30 09:46:48 2016 -0700

    Call the correct function.

Diff:
---
 nss/nss_borg/borg-pwd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nss/nss_borg/borg-pwd.c b/nss/nss_borg/borg-pwd.c
index 4f6c5443e8..9b68b9bec7 100644
--- a/nss/nss_borg/borg-pwd.c
+++ b/nss/nss_borg/borg-pwd.c
@@ -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 {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27 23:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:23 [glibc/maskray/grte] Call the correct function Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).