[PATCH] kexec.c: workaround getline and fscanf to make it *libc agnostic. Tested against klibc and dietlibc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simon Horman schrieb:
>  
> +
> +	if ( NULL == p)
> +		return -1;

Wouldn't that be better 'p == NULL'?

> +	ret = strtol(line, &p, 10);
> +
> +	/* Too long */
> +	if (ret > INT_MAX)
> +		return -1;

An integer that can be represented in 2 (strlen("__\0")==3) cannot be
larger than INT_MAX on any platform I can imagine. ;-)




Regards,
Bernhard



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux