[BusyBox] pwd_grp.c: unlocked functions [PATCH]
Shaun Jackman
sjackman at gmail.com
Wed Apr 6 18:18:22 UTC 2005
pwd_grp.c uses fgets_unlocked and feof_unlocked, which are
non-portable functions. Use fgets and feof instead. It also uses
fputc_unlocked, which, although unusual, is portable (SUSv3).
Cheers,
Shaun
2005-04-06 Shaun Jackman <sjackman at gmail.com>
* libpwdgrp/pwd_grp.c (__pgsreader): Use fgets and feof instead of
the non-portable unlocked variants.
Index: libpwdgrp/pwd_grp.c
===================================================================
--- libpwdgrp/pwd_grp.c (revision 10071)
+++ libpwdgrp/pwd_grp.c (working copy)
@@ -1067,8 +1067,8 @@
} else {
skip = 0;
do {
- if (!fgets_unlocked(line_buff, buflen, f)) {
- if (feof_unlocked(f)) {
+ if (!fgets(line_buff, buflen, f)) {
+ if (feof(f)) {
rv = ENOENT;
}
break;
More information about the busybox
mailing list