diff options
| -rw-r--r-- | findutils/xargs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c index 5c2668553..d9f8a3b18 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
| @@ -222,10 +222,10 @@ static char* FAST_FUNC process_stdin(int n_max_chars, int n_max_arg, char *buf) | |||
| 222 | goto ret; | 222 | goto ret; |
| 223 | } | 223 | } |
| 224 | } | 224 | } |
| 225 | n_max_chars -= (p - s); | ||
| 226 | /* if (n_max_chars < 0) impossible */ | ||
| 227 | store_param(s); | 225 | store_param(s); |
| 228 | dbg_msg("args[]:'%s'", s); | 226 | dbg_msg("args[]:'%s'", s); |
| 227 | n_max_chars -= (p - s); | ||
| 228 | /* if (n_max_chars < 0) impossible */ | ||
| 229 | s = p; | 229 | s = p; |
| 230 | n_max_arg--; | 230 | n_max_arg--; |
| 231 | if (n_max_arg == 0 || n_max_chars == 0) { | 231 | if (n_max_arg == 0 || n_max_chars == 0) { |
| @@ -276,10 +276,10 @@ static char* FAST_FUNC process_stdin(int n_max_chars, int n_max_arg, char *buf) | |||
| 276 | goto ret; | 276 | goto ret; |
| 277 | } | 277 | } |
| 278 | } | 278 | } |
| 279 | n_max_chars -= (p - s); | ||
| 280 | /* if (n_max_chars < 0) impossible */ | ||
| 281 | store_param(s); | 279 | store_param(s); |
| 282 | dbg_msg("args[]:'%s'", s); | 280 | dbg_msg("args[]:'%s'", s); |
| 281 | n_max_chars -= (p - s); | ||
| 282 | /* if (n_max_chars < 0) impossible */ | ||
| 283 | s = p; | 283 | s = p; |
| 284 | n_max_arg--; | 284 | n_max_arg--; |
| 285 | if (n_max_arg == 0 || n_max_chars == 0) { | 285 | if (n_max_arg == 0 || n_max_chars == 0) { |
| @@ -317,12 +317,12 @@ static char* FAST_FUNC process0_stdin(int n_max_chars, int n_max_arg, char *buf) | |||
| 317 | *p++ = c; | 317 | *p++ = c; |
| 318 | if (c == '\0') { /* word's delimiter or EOF detected */ | 318 | if (c == '\0') { /* word's delimiter or EOF detected */ |
| 319 | /* A full word is loaded */ | 319 | /* A full word is loaded */ |
| 320 | n_max_chars -= (p - s); | ||
| 321 | /* if (n_max_chars < 0) impossible */ | ||
| 322 | store_param(s); | 320 | store_param(s); |
| 323 | dbg_msg("args[]:'%s'", s); | 321 | dbg_msg("args[]:'%s'", s); |
| 324 | n_max_arg--; | 322 | n_max_chars -= (p - s); |
| 323 | /* if (n_max_chars < 0) impossible */ | ||
| 325 | s = p; | 324 | s = p; |
| 325 | n_max_arg--; | ||
| 326 | if (n_max_arg == 0 || n_max_chars == 0) { | 326 | if (n_max_arg == 0 || n_max_chars == 0) { |
| 327 | goto ret; | 327 | goto ret; |
| 328 | } | 328 | } |
