浏览代码

getprotoent_r: use correct define for return value

Doesn't correctly set result=NULL on error or EOF.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 15 年之前
父节点
当前提交
d2924a76c3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libc/inet/getproto.c

+ 1 - 1
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;
     }