summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/assert/__assert.c2
-rw-r--r--libc/misc/fnmatch/fnmatch.c2
-rw-r--r--libc/misc/internals/__uClibc_main.c3
-rw-r--r--libc/misc/regex/regex_old.c2
-rw-r--r--libc/misc/time/time.c6
5 files changed, 7 insertions, 8 deletions
diff --git a/libc/misc/assert/__assert.c b/libc/misc/assert/__assert.c
index bd3b3a91d..7a2fa1dce 100644
--- a/libc/misc/assert/__assert.c
+++ b/libc/misc/assert/__assert.c
@@ -44,7 +44,7 @@ libc_hidden_proto(__assert)
#define ASSERT_SHOW_PROGNAME 1
-static int in_assert; /* bss inits to 0. */
+static smallint in_assert; /* bss inits to 0. */
void attribute_noreturn __assert(const char *assertion, const char * filename,
int linenumber, register const char * function)
diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index 5e8578671..071626ff7 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/libc/misc/fnmatch/fnmatch.c
@@ -211,7 +211,7 @@ extern int errno;
# endif
/* Global variable. */
-static int posixly_correct;
+static smallint posixly_correct;
/* This function doesn't exist on most systems. */
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 92aeead0e..60989298e 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -22,7 +22,6 @@
#include <link.h>
#include <bits/uClibc_page.h>
#include <paths.h>
-#include <unistd.h>
#include <asm/errno.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -183,7 +182,7 @@ extern void __uClibc_init(void);
libc_hidden_proto(__uClibc_init)
void __uClibc_init(void)
{
- static int been_there_done_that = 0;
+ static smallint been_there_done_that;
if (been_there_done_that)
return;
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index 770392858..57b97ae68 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -798,7 +798,7 @@ PREFIX(extract_number_and_incr) (destination, source)
/* It is useful to test things that ``must'' be true when debugging. */
# include <assert.h>
-static int debug;
+static smallint debug;
# define DEBUG_STATEMENT(e) e
# define DEBUG_PRINT1(x) if (debug) printf (x)
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 1fdd652bb..456bc25ab 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -1825,7 +1825,7 @@ static const char *getnumber(register const char *e, int *pn)
#ifdef __UCLIBC_HAS_TZ_FILE__
#ifndef __UCLIBC_HAS_TZ_FILE_READ_MANY__
-static int TZ_file_read; /* Let BSS initialization set this to 0. */
+static smallint TZ_file_read; /* Let BSS initialization set this to 0. */
#endif /* __UCLIBC_HAS_TZ_FILE_READ_MANY__ */
static char *read_TZ_file(char *buf)
@@ -1853,7 +1853,7 @@ static char *read_TZ_file(char *buf)
p[-1] = 0;
p = buf;
#ifndef __UCLIBC_HAS_TZ_FILE_READ_MANY__
- ++TZ_file_read;
+ TZ_file_read = 1;
#endif /* __UCLIBC_HAS_TZ_FILE_READ_MANY__ */
} else {
ERROR:
@@ -1901,7 +1901,7 @@ void _time_tzset(int use_old_rules)
if (e != NULL) {
TZ_file_read = 0; /* Reset if the TZ env var is set. */
- } else if (TZ_file_read > 0) {
+ } else if (TZ_file_read) {
goto FAST_DONE;
}
#endif /* defined(__UCLIBC_HAS_TZ_FILE__) && !defined(__UCLIBC_HAS_TZ_FILE_READ_MANY__) */