Hi, 2014-07-26 15:02 GMT-03:00 walter harms <wha...@bfs.de>: > what is the advantage ?
I think correctness is a good advantage. I mean, why use a signed integer, if this variable works as (and with) unsigned integers only? > > re, > wh > > Am 26.07.2014 19:37, schrieb Guilherme Maciel Ferreira: >> The variable i is used only to index and to be assigned to other unsigned >> integers. >> >> Signed-off-by: Guilherme Maciel Ferreira >> <guilherme.maciel.ferre...@gmail.com> >> --- >> coreutils/tail.c | 5 +++-- >> 1 files changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/coreutils/tail.c b/coreutils/tail.c >> index e352ab6..c44aeb8 100644 >> --- a/coreutils/tail.c >> +++ b/coreutils/tail.c >> @@ -100,7 +100,8 @@ int tail_main(int argc, char **argv) >> size_t tailbufsize; >> unsigned header_threshhold = 1; >> unsigned nfiles; >> - int i, opt; >> + unsigned i; >> + int opt; >> >> int *fds; >> const char *fmt; >> @@ -161,7 +162,7 @@ int tail_main(int argc, char **argv) >> } >> fds[nfiles] = fd; >> argv[nfiles++] = argv[i]; >> - } while (++i < argc); >> + } while (++i < (unsigned) argc); >> >> if (!nfiles) >> bb_error_msg_and_die("no files"); > _______________________________________________ > busybox mailing list > busybox@busybox.net > http://lists.busybox.net/mailman/listinfo/busybox -- Guilherme Maciel Ferreira Mobile Brazil: +55 48 9917 3969 Site: http://guilhermemacielferreira.com/ Skype: guilherme.maciel.ferreira _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox