Marin Ramesa, le Sun 08 Dec 2013 12:40:11 +0100, a écrit :
> First loop iteration ensures that the value is non-zero. Second loop iteration
> likewise. Therefore name[1] is always non-zero if the loop is executed.
Uh? It seems wrong to me. Please show a precise variable evolution shart.
> * ddb/db_aout.c (aout_db_is_filename): Remove unnecessary check.
>
> ---
> ddb/db_aout.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/ddb/db_aout.c b/ddb/db_aout.c
> index 63fa518..9a018a6 100644
> --- a/ddb/db_aout.c
> +++ b/ddb/db_aout.c
> @@ -135,10 +135,8 @@ aout_db_is_filename(name)
> char *name;
> {
> while (*name) {
> - if (*name == '.') {
> - if (name[1])
> - return(TRUE);
> - }
> + if (*name == '.')
> + return(TRUE);
> name++;
> }
> return(FALSE);
> --
> 1.8.1.4
>
>
--
Samuel
"c'est pas nous qui sommes à la rue, c'est la rue qui est à nous"