From d2924a76c315a4cd0f4649511c55b08422b06342 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sat, 23 Jan 2010 23:25:01 +0100 Subject: getprotoent_r: use correct define for return value Doesn't correctly set result=NULL on error or EOF. Signed-off-by: Bernhard Reutner-Fischer --- libc/inet/getproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/inet/getproto.c') diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c index c297a6549..bf7c09371 100644 --- a/libc/inet/getproto.c +++ b/libc/inet/getproto.c @@ -144,7 +144,7 @@ int getprotoent_r(struct protoent *result_buf, } again: if ((p = fgets(line, BUFSIZ, protof)) == NULL) { - rv=TRY_AGAIN; + rv=ENOENT; goto DONE; } -- cgit v1.2.3