summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild1
-rw-r--r--libbb/fflush_stdout_and_exit.c6
-rw-r--r--libbb/getopt32.c2
-rw-r--r--libbb/xfuncs.c6
4 files changed, 6 insertions, 9 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild
index 3b16f5c..0dd8c2b 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild
@@ -54,7 +54,6 @@ lib-$(CONFIG_DEVFSD) += xregcomp.o
lib-y += messages.o
lib-y += xfuncs.o
-lib-y += printf.o
lib-y += xatol.o
lib-y += safe_strtol.o
lib-y += bb_pwd.o
diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c
index 6df8dde..456ce95 100644
--- a/libbb/fflush_stdout_and_exit.c
+++ b/libbb/fflush_stdout_and_exit.c
@@ -11,11 +11,9 @@
* in an error state.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <libbb.h>
+#include "libbb.h"
-void bb_fflush_stdout_and_exit(int retval)
+void fflush_stdout_and_exit(int retval)
{
if (fflush(stdout)) {
retval = xfunc_error_retval;
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index 967729a..f442933 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -143,7 +143,7 @@ const char *opt_complementary
while (my_b) { dosomething_with(my_b->data); my_b = my_b->link; }
if (my_b) // but llist is stored if -b is specified
free_llist(my_b);
- if (verbose_level) bb_printf("verbose level is %d\n", verbose_level);
+ if (verbose_level) printf("verbose level is %d\n", verbose_level);
Special characters:
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 0a6d90d..c5e18c3 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -130,7 +130,7 @@ off_t xlseek(int fd, off_t offset, int whence)
}
// Die with supplied error message if this FILE * has ferror set.
-void xferror(FILE *fp, const char *fn)
+void die_if_ferror(FILE *fp, const char *fn)
{
if (ferror(fp)) {
bb_error_msg_and_die("%s", fn);
@@ -138,9 +138,9 @@ void xferror(FILE *fp, const char *fn)
}
// Die with an error message if stdout has ferror set.
-void xferror_stdout(void)
+void die_if_ferror_stdout(void)
{
- xferror(stdout, bb_msg_standard_output);
+ die_if_ferror(stdout, bb_msg_standard_output);
}
// Die with an error message if we have trouble flushing stdout.