projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite to allow omitting initialization of global variables.
[kopensolaris-gnu/glibc.git]
/
misc
/
mntent_r.c
diff --git
a/misc/mntent_r.c
b/misc/mntent_r.c
index
94b1d15
..
f6ee1ca
100644
(file)
--- a/
misc/mntent_r.c
+++ b/
misc/mntent_r.c
@@
-22,6
+22,11
@@
#include <string.h>
#include <sys/types.h>
#include <string.h>
#include <sys/types.h>
+#ifdef USE_IN_LIBIO
+# define flockfile(s) _IO_flockfile (s)
+# define funlockfile(s) _IO_funlockfile (s)
+#endif
+
/* Prepare to begin reading and/or writing mount table entries from the
beginning of FILE. MODE is as for `fopen'. */
FILE *
/* Prepare to begin reading and/or writing mount table entries from the
beginning of FILE. MODE is as for `fopen'. */
FILE *
@@
-132,10
+137,11
@@
__hasmntopt (const struct mntent *mnt, const char *opt)
while ((p = strstr (rest, opt)) != NULL)
{
while ((p = strstr (rest, opt)) != NULL)
{
- if (p == rest || p[-1] == ',' &&
- (p[optlen] == '\0' ||
- p[optlen] == '=' ||
- p[optlen] == ','))
+ if (p == rest
+ || (p[-1] == ','
+ && (p[optlen] == '\0' ||
+ p[optlen] == '=' ||
+ p[optlen] == ',')))
return p;
rest = strchr (rest, ',');
return p;
rest = strchr (rest, ',');