aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-10-08 02:23:22 +0000
committerRob Landley <rob@landley.net>2005-10-08 02:23:22 +0000
commit25413bfe0046db6989d309efc8d5b95f078ccbcc (patch)
tree8ac50867a437032e9e1d56e53db2ef27087424dd
parenta9d8913bc734039716e5c63c4b2173986f58b45d (diff)
downloadbusybox-w32-25413bfe0046db6989d309efc8d5b95f078ccbcc.tar.gz
busybox-w32-25413bfe0046db6989d309efc8d5b95f078ccbcc.tar.bz2
busybox-w32-25413bfe0046db6989d309efc8d5b95f078ccbcc.zip
Shaun Jackman pointed out that fgets_unlocked() and friends are gnu extensions
not in newlib, and also that all the _unlocked variants are kind of pointless in this context.
-rw-r--r--libpwdgrp/pwd_grp.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
index 9412faeb4..3661834b2 100644
--- a/libpwdgrp/pwd_grp.c
+++ b/libpwdgrp/pwd_grp.c
@@ -1,18 +1,6 @@
1/* Copyright (C) 2003 Manuel Novoa III 1/* Copyright (C) 2003 Manuel Novoa III
2 * 2 *
3 * This library is free software; you can redistribute it and/or 3 * Licensed under GPL v2, or later. See file LICENSE in this tarball.
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the Free
15 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 */ 4 */
17 5
18/* Nov 6, 2003 Initial version. 6/* Nov 6, 2003 Initial version.
@@ -745,7 +733,7 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f)
745 733
746 do { 734 do {
747 if (!*m) { 735 if (!*m) {
748 if (fputc_unlocked('\n', f) >= 0) { 736 if (fputc('\n', f) >= 0) {
749 rv = 0; 737 rv = 0;
750 } 738 }
751 break; 739 break;
@@ -806,7 +794,7 @@ int putspent(const struct spwd *p, FILE *stream)
806 goto DO_UNLOCK; 794 goto DO_UNLOCK;
807 } 795 }
808 796
809 if (fputc_unlocked('\n', stream) > 0) { 797 if (fputc('\n', stream) > 0) {
810 rv = 0; 798 rv = 0;
811 } 799 }
812 800
@@ -1067,8 +1055,8 @@ int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
1067 } else { 1055 } else {
1068 skip = 0; 1056 skip = 0;
1069 do { 1057 do {
1070 if (!fgets_unlocked(line_buff, buflen, f)) { 1058 if (!fgets(line_buff, buflen, f)) {
1071 if (feof_unlocked(f)) { 1059 if (feof(f)) {
1072 rv = ENOENT; 1060 rv = ENOENT;
1073 } 1061 }
1074 break; 1062 break;