diff options
Diffstat (limited to 'src/lib/libc/net/getprotoent.c')
-rw-r--r-- | src/lib/libc/net/getprotoent.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/net/getprotoent.c b/src/lib/libc/net/getprotoent.c index f0705e0765..87060b7b3c 100644 --- a/src/lib/libc/net/getprotoent.c +++ b/src/lib/libc/net/getprotoent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getprotoent.c,v 1.10 2007/09/02 15:19:17 deraadt Exp $ */ | 1 | /* $OpenBSD: getprotoent.c,v 1.11 2014/09/15 06:15:48 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -42,7 +42,7 @@ void | |||
42 | setprotoent_r(int f, struct protoent_data *pd) | 42 | setprotoent_r(int f, struct protoent_data *pd) |
43 | { | 43 | { |
44 | if (pd->fp == NULL) | 44 | if (pd->fp == NULL) |
45 | pd->fp = fopen(_PATH_PROTOCOLS, "r" ); | 45 | pd->fp = fopen(_PATH_PROTOCOLS, "re" ); |
46 | else | 46 | else |
47 | rewind(pd->fp); | 47 | rewind(pd->fp); |
48 | pd->stayopen |= f; | 48 | pd->stayopen |= f; |
@@ -71,7 +71,7 @@ getprotoent_r(struct protoent *pe, struct protoent_data *pd) | |||
71 | long l; | 71 | long l; |
72 | int serrno; | 72 | int serrno; |
73 | 73 | ||
74 | if (pd->fp == NULL && (pd->fp = fopen(_PATH_PROTOCOLS, "r" )) == NULL) | 74 | if (pd->fp == NULL && (pd->fp = fopen(_PATH_PROTOCOLS, "re" )) == NULL) |
75 | return (-1); | 75 | return (-1); |
76 | again: | 76 | again: |
77 | if ((p = fgetln(pd->fp, &len)) == NULL) | 77 | if ((p = fgetln(pd->fp, &len)) == NULL) |