Date: Sun, 13 Oct 2024 14:21:39 -0400 From: "David E. Cross" <david@crossfamilyweb.com> To: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Cc: freebsd-hackers@freebsd.org Subject: Re: Review D38047 ... and then there was one.... Message-ID: <f819b96f-81a9-5b95-07e2-1c57c3bdb32e@crossfamilyweb.com> In-Reply-To: <553ea3d5-c94e-9c2f-c044-db7986625c74@crossfamilyweb.com> References: <1fd47603-0bf2-4fcf-a556-22335d99e203@plan-b.pwste.edu.pl> <DB1FFEBD-1FD4-43A5-9899-85C6DD292E3E@gmail.com> <a9b5e3e7-904f-46be-ab0e-068c6e6fef0a@plan-b.pwste.edu.pl> <553ea3d5-c94e-9c2f-c044-db7986625c74@crossfamilyweb.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
[-- Attachment #2 --]
diff --git a/lib/libc/net/nscache.c b/lib/libc/net/nscache.c
index 3537d77edbbe..9375d1c9adb1 100644
--- a/lib/libc/net/nscache.c
+++ b/lib/libc/net/nscache.c
@@ -317,11 +317,11 @@ __nss_mp_cache_read(void *retval, void *mdata, va_list ap)
__close_cached_mp_read_session(rs);
rs = INVALID_CACHED_MP_READ_SESSION;
cache_info->set_mp_rs_func(rs);
- return (res == -1 ? NS_RETURN : NS_UNAVAIL);
+ return (res == 1 ? NS_NOTFOUND : NS_UNAVAIL);
}
free(buffer);
- return (res == 0 ? NS_SUCCESS : NS_NOTFOUND);
+ return (NS_SUCCESS);
}
int
diff --git a/lib/libc/net/nscachedcli.c b/lib/libc/net/nscachedcli.c
index f57e69bdceb2..bb3f13784f4c 100644
--- a/lib/libc/net/nscachedcli.c
+++ b/lib/libc/net/nscachedcli.c
@@ -538,7 +538,7 @@ __cached_mp_read(struct cached_connection_ *rs, char *data, size_t *data_size)
goto fin;
if (rec_error_code != 0) {
- error_code = rec_error_code;
+ error_code = -rec_error_code;
goto fin;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f819b96f-81a9-5b95-07e2-1c57c3bdb32e>
