diff options
author | Rob Landley | 2006-08-28 19:40:08 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-28 19:40:08 +0000 |
commit | abfe107f7899145720741dd9051f9fe06fcd7030 (patch) | |
tree | c330a3b93c62f67b2099d030b6d8c016d902c01a /libbb | |
parent | 82ac9ecfe59e25606d6e4163ba182a547f9d7180 (diff) | |
download | busybox-abfe107f7899145720741dd9051f9fe06fcd7030.zip busybox-abfe107f7899145720741dd9051f9fe06fcd7030.tar.gz |
No real need for my_query_module() and this eliminates some type-punned
pointer warning on certain gcc versions (and saves 38 bytes).
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Makefile.in | 2 | ||||
-rw-r--r-- | libbb/qmodule.c | 30 |
2 files changed, 1 insertions, 31 deletions
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index 4f688e7..ae9c9f0 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in @@ -23,7 +23,7 @@ LIBBB-y:= \ make_directory.c md5.c mode_string.c mtab_file.c \ obscure.c parse_mode.c parse_number.c perror_msg.c \ perror_msg_and_die.c get_console.c \ - process_escape_sequence.c procps.c qmodule.c \ + process_escape_sequence.c procps.c \ recursive_action.c remove_file.c \ restricted_shell.c run_parts.c run_shell.c safe_read.c safe_write.c \ safe_strncpy.c setup_environment.c sha1.c simplify_path.c \ diff --git a/libbb/qmodule.c b/libbb/qmodule.c deleted file mode 100644 index 4e4e79d..0000000 --- a/libbb/qmodule.c +++ /dev/null @@ -1,30 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - Copyright (C) 2002 Tim Riker <Tim@Rikers.org> - everyone seems to claim it someplace. ;-) -*/ - -#include <errno.h> - -#include "libbb.h" - -int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret); - -int my_query_module(const char *name, int which, void **buf, - size_t *bufsize, size_t *ret) -{ - int my_ret; - - my_ret = query_module(name, which, *buf, *bufsize, ret); - - if (my_ret == -1 && errno == ENOSPC) { - *buf = xrealloc(*buf, *ret); - *bufsize = *ret; - - my_ret = query_module(name, which, *buf, *bufsize, ret); - } - - return my_ret; -} - - |