aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-07 00:44:31 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-07 00:44:31 +0000
commit04c99ebb4f59d784d8bceaad86cb6227c1babd17 (patch)
tree706ebe3ac53a058c11f8a053f073fa6a387f0bbb
parent19507f0869571f29cfd0a4aed3d7c07db038b129 (diff)
downloadbusybox-04c99ebb4f59d784d8bceaad86cb6227c1babd17.tar.gz
random small shrinkage and elimination of statics
-rw-r--r--archival/libunarchive/get_header_ar.c4
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/verror_msg.c2
-rw-r--r--networking/isrv_identd.c7
4 files changed, 8 insertions, 7 deletions
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c
index c691f1b2f..88c0220ad 100644
--- a/archival/libunarchive/get_header_ar.c
+++ b/archival/libunarchive/get_header_ar.c
@@ -23,9 +23,9 @@ char get_header_ar(archive_handle_t *archive_handle)
char magic[2];
} formatted;
} ar;
-#ifdef CONFIG_FEATURE_AR_LONG_FILENAMES
+#if ENABLE_FEATURE_AR_LONG_FILENAMES
static char *ar_long_names;
- static unsigned int ar_long_name_size;
+ static unsigned ar_long_name_size;
#endif
/* dont use xread as we want to handle the error ourself */
diff --git a/include/libbb.h b/include/libbb.h
index dca611b68..764d707b8 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -604,7 +604,7 @@ enum {
LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO,
};
extern const char *msg_eol;
-extern int logmode;
+extern smallint logmode;
extern int die_sleep;
extern int xfunc_error_retval;
extern void sleep_and_die(void) ATTRIBUTE_NORETURN;
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c
index 0f018c517..526b9d36c 100644
--- a/libbb/verror_msg.c
+++ b/libbb/verror_msg.c
@@ -10,7 +10,7 @@
#include "libbb.h"
#include <syslog.h>
-int logmode = LOGMODE_STDIO;
+smallint logmode = LOGMODE_STDIO;
const char *msg_eol = "\n";
void bb_verror_msg(const char *s, va_list p, const char* strerr)
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c
index c230c7ec3..59daf99ed 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -19,7 +19,7 @@ typedef struct identd_buf_t {
char buf[64 - 2*sizeof(int)];
} identd_buf_t;
-static const char *bogouser = "nobody";
+#define bogouser bb_common_bufsiz1
static int new_peer(isrv_state_t *state, int fd)
{
@@ -108,8 +108,9 @@ int fakeidentd_main(int argc, char **argv)
int fd;
opt = getopt32(argc, argv, "fiwb:", &bind_address);
- if (optind < argc)
- bogouser = argv[optind];
+ strcpy(bogouser, "nobody");
+ if (argv[optind])
+ strncpy(bogouser, argv[optind], sizeof(bogouser));
/* Daemonize if no -f and no -i and no -w */
if (!(opt & OPT_fiw));