[PATCH] strings: size reduction
Tito
farmatito at tiscali.it
Sat Nov 22 14:43:58 UTC 2008
Hi.
this patch removes one not needed var from strings.c
and saves a little size.
strings_main 393 371 -22
It also adds the year to the copyright statement.
Please apply.
Ciao,
Tito
--- miscutils/strings_orig.c 2008-07-05 21:07:45.000000000 +0200
+++ miscutils/strings.c 2008-11-22 15:37:58.000000000 +0100
@@ -2,7 +2,7 @@
/*
* strings implementation for busybox
*
- * Copyright Tito Ragusa <farmatito at tiscali.it>
+ * Copyright 2003 Tito Ragusa <farmatito at tiscali.it>
*
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/
@@ -18,7 +18,6 @@
int strings_main(int argc UNUSED_PARAM, char **argv)
{
int n, c, status = EXIT_SUCCESS;
- unsigned opt;
unsigned count;
off_t offset;
FILE *file;
@@ -26,7 +25,7 @@
const char *fmt = "%s: ";
const char *n_arg = "4";
- opt = getopt32(argv, "afon:", &n_arg);
+ getopt32(argv, "afon:", &n_arg);
/* -a is our default behaviour */
/*argc -= optind;*/
argv += optind;
@@ -56,10 +55,10 @@
} else {
string[count] = c;
if (count == n) {
- if (opt & PRINT_NAME) {
+ if (option_mask32 & PRINT_NAME) {
printf(fmt, *argv);
}
- if (opt & PRINT_OFFSET) {
+ if (option_mask32 & PRINT_OFFSET) {
printf("%7"OFF_FMT"o ", offset - n);
}
fputs(string, stdout);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strings.patch
Type: text/x-diff
Size: 1131 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20081122/0a363779/attachment.bin
More information about the busybox
mailing list