[PATCH 2/3] seq: match f's type with strlen() result type
walter harms
wharms at bfs.de
Sat Jul 26 18:05:35 UTC 2014
actually strlen() returns size_t. When you really need this to be "correct"
you should use size_t.
Did you get an error with a certain system.
re,
wh
Am 26.07.2014 19:37, schrieb Guilherme Maciel Ferreira:
> The variable f compares and receives only unsigned values.
>
> Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira at gmail.com>
> ---
> coreutils/seq.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/coreutils/seq.c b/coreutils/seq.c
> index 8986192..d3b449a 100644
> --- a/coreutils/seq.c
> +++ b/coreutils/seq.c
> @@ -70,7 +70,7 @@ int seq_main(int argc, char **argv)
> while (1) {
> char *dot = strchrnul(*argv, '.');
> int w = (dot - *argv);
> - int f = strlen(dot);
> + unsigned f = strlen(dot);
> if (width < w)
> width = w;
> argv++;
More information about the busybox
mailing list