Selon Benoit Audouard <[EMAIL PROTECTED]>:

> Le samedi 23 octobre 2004 à 12:38 +0200, [EMAIL PROTECTED] a écrit :
> > Selon [EMAIL PROTECTED]:
> > > So we must replace strtol by strtoll.
> >
> > No it's strtoul. I'm going to commit the correction.
> it's line 1740 ?
>             (*opts)[i].value = (uint32_t) strtoul (ptr,NULL,16);
Not only.

> we should cast to int32_t if it exists (and verify that strtoul takes
> into account the whole value of the higher byte). Indeed, seeing the
> values of CMV we are sometimes above 7f ff ff ff (I've put spaces to
> read it better ;-) )

Options are coded on 32bits, and we consider as unsigned number
(OPTN0=-2147352474 is not intuitive).
So the type of "(*opts)[i].value" is imposed by the modem.

> Is it the only place we are using it ? (for VPI / VCI that will be ok as
> values are much lower...)

A first time for option file, a second time for cmvs file.


> > Function "parse_file" doesn't return EXIT_SUCCESS or EXIT_FAILURE
> > as other functions, it returns "TRUE" or "FALSE". It's disturbing.
> are values the same ? where is declared EXIT_SUCCESS ?
> find . -type f -exec grep EXIT_SUCCESS {} \; # does not show it...

No.
EXIT_SUCCESS=0; EXIT_FAILURE=1; // I believe
FALSE=0; TRUE=1;               // Logic

All is good!!! But my first correction was bugged,
I wrote "retcode=EXIT_FAILURE;" instead of "retcode=FALSE;".
It's a trap ;-).

mcoolive.

Reply via email to