summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-11-17 17:09:06 +0000
committerEric Andersen <andersen@codepoet.org>2000-11-17 17:09:06 +0000
commit6d8a9ea7225b228f05cd6bc87165579d38d1994d (patch)
tree3e536acba3c52914406f134584ff898e71ac09ec /libc
parent667e48352acadd4333d85a2fa9e285e3692b7e5f (diff)
Some cleanups from Manuel Novoa III <mnovoa3@bellsouth.net>,
and a bit of extra cleanup in the test makefiles.
Diffstat (limited to 'libc')
-rw-r--r--libc/stdio/scanf.c5
-rw-r--r--libc/stdio/stdio.c2
-rw-r--r--libc/sysdeps/linux/common/Makefile8
3 files changed, 9 insertions, 6 deletions
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c
index 51d30cdde..2962125b4 100644
--- a/libc/stdio/scanf.c
+++ b/libc/stdio/scanf.c
@@ -201,15 +201,16 @@ va_list ap;
strcpy(delim, "\011\012\013\014\015 ");
strcpy(digits, "0123456789ABCDEF");
- if (fmt[1] == '*') {
+ if (*++fmt == '*') {
endnull = store = 0;
++fmt;
}
- while (isdigit(*++fmt)) { /* width digit(s) */
+ while (isdigit(*fmt)) { /* width digit(s) */
if (width == -1)
width = 0;
wide1 = width = (width * 10) + (*fmt - '0');
+ ++fmt;
}
--fmt;
fmtnxt:
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c
index 6c8c69380..367f3f9e4 100644
--- a/libc/stdio/stdio.c
+++ b/libc/stdio/stdio.c
@@ -609,6 +609,8 @@ const char *mode;
int fopen_mode = 0;
FILE *nfp = 0;
+ Inline_init;
+
/* If we've got an fp close the old one (freopen) */
if (fp) {
/* Careful, don't de-allocate it */
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 03a4603e9..5be38fdd3 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -26,10 +26,10 @@ include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
-CSRC =closedir.o dirfd.o getdents.o getdnnm.o gethstnm.o getpagesize.o \
- isatty.o kernel_version.o mkfifo.o opendir.o readdir.o rewinddir.o \
- seekdir.o setegid.o seteuid.o setpgrp.o statfix.o tell.o telldir.o \
- wait.o wait3.o _xmknod.o _fxstat.o _lxstat.o _xstat.o libc_init.o tcgetatr.o
+CSRC =closedir.c dirfd.c getdents.c getdnnm.c gethstnm.c getpagesize.c \
+ isatty.c kernel_version.c mkfifo.c opendir.c readdir.c rewinddir.c \
+ seekdir.c setegid.c seteuid.c setpgrp.c statfix.c tell.c telldir.c \
+ wait.c wait3.c _xmknod.c _fxstat.c _lxstat.c _xstat.c libc_init.c tcgetatr.c
COBJS=$(patsubst %.c,%.o, $(CSRC))