remove outdated and do not corected comment. Use bb_xasprintf instead xmalloc+set+set+strcpy.

This commit is contained in:
"Vladimir N. Oleynik" 2006-01-30 10:49:14 +00:00
parent 646129163a
commit b1fd52e0b7

View File

@ -18,7 +18,6 @@
#include <unistd.h> #include <unistd.h>
#include "busybox.h" #include "busybox.h"
/* If nonzero, count bytes, not column positions. */
static unsigned long flags; static unsigned long flags;
#define FLAG_COUNT_BYTES 1 #define FLAG_COUNT_BYTES 1
#define FLAG_BREAK_SPACES 2 #define FLAG_BREAK_SPACES 2
@ -58,16 +57,11 @@ extern int fold_main(int argc, char **argv)
for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {
char const *a = argv[i]; char const *a = argv[i];
if (a[0] == '-') { if (*a++ == '-') {
if (a[1] == '-' && !a[2]) if (*a == '-' && !a[1])
break; break;
if (isdigit(a[1])) { if (isdigit(*a)) {
char *s = xmalloc(strlen(a) + 2); argv[i] = bb_xasprintf("-w%s", a);
s[0] = '-';
s[1] = 'w';
strcpy(s + 2, a + 1);
argv[i] = s;
} }
} }
} }