aboutsummaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-05 08:24:43 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-05 08:24:43 +0000
commiteb27c43f02ec7890c19f424de458df903745db5d (patch)
tree56dc7e91fe0c7f4df5f27af57cbe957c116c6ce5 /inet
parent71cf0361ecbeedcb7630f09942011f38cc9ea322 (diff)
downloadglibc-eb27c43f02ec7890c19f424de458df903745db5d.zip
glibc-eb27c43f02ec7890c19f424de458df903745db5d.tar.gz
glibc-eb27c43f02ec7890c19f424de458df903745db5d.tar.bz2
Update.
1998-05-23 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/unix/sysv/linux/arm/syscalls.list: Add `syscall'. * sysdeps/unix/sysv/linux/arm/syscall.S: Deleted. 1998-07-05 Ulrich Drepper <drepper@cygnus.com> * misc/getttyent.c (getttyent): Explicitly lock the FILE and use _unlocked functions. * inet/ruserpass.c (ruserpass): Use _unlocked functions since this is a private FILE.
Diffstat (limited to 'inet')
-rw-r--r--inet/ruserpass.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/inet/ruserpass.c b/inet/ruserpass.c
index 421bfc5..9c09051 100644
--- a/inet/ruserpass.c
+++ b/inet/ruserpass.c
@@ -187,7 +187,8 @@ next:
(void) fclose(cfile);
return (0);
}
- while ((c=getc(cfile)) != EOF && c == ' ' || c == '\t');
+ while ((c=getc_unlocked(cfile)) != EOF && c == ' '
+ || c == '\t');
if (c == EOF || c == '\n') {
printf("Missing macdef name argument.\n");
goto bad;
@@ -198,7 +199,7 @@ next:
}
tmp = macros[macnum].mac_name;
*tmp++ = c;
- for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
+ for (i=0; i < 8 && (c=getc_unlocked(cfile)) != EOF &&
!isspace(c); ++i) {
*tmp++ = c;
}
@@ -208,7 +209,8 @@ next:
}
*tmp = '\0';
if (c != '\n') {
- while ((c=getc(cfile)) != EOF && c != '\n');
+ while ((c=getc_unlocked(cfile)) != EOF
+ && c != '\n');
}
if (c == EOF) {
printf("Macro definition missing null line terminator.\n");
@@ -222,7 +224,7 @@ next:
}
tmp = macros[macnum].mac_start;
while (tmp != macbuf + 4096) {
- if ((c=getc(cfile)) == EOF) {
+ if ((c=getc_unlocked(cfile)) == EOF) {
printf("Macro definition missing null line terminator.\n");
goto bad;
}
@@ -265,24 +267,24 @@ token()
if (feof(cfile) || ferror(cfile))
return (0);
- while ((c = getc(cfile)) != EOF &&
+ while ((c = getc_unlocked(cfile)) != EOF &&
(c == '\n' || c == '\t' || c == ' ' || c == ','))
continue;
if (c == EOF)
return (0);
cp = tokval;
if (c == '"') {
- while ((c = getc(cfile)) != EOF && c != '"') {
+ while ((c = getc_unlocked(cfile)) != EOF && c != '"') {
if (c == '\\')
- c = getc(cfile);
+ c = getc_unlocked(cfile);
*cp++ = c;
}
} else {
*cp++ = c;
- while ((c = getc(cfile)) != EOF
+ while ((c = getc_unlocked(cfile)) != EOF
&& c != '\n' && c != '\t' && c != ' ' && c != ',') {
if (c == '\\')
- c = getc(cfile);
+ c = getc_unlocked(cfile);
*cp++ = c;
}
}