Re: cmd: Avoid mixing signed and unsigned type in conditional expression

2011-10-28 Thread Frédéric Delanoy
2011/10/27 Michael Stefaniuc : > On 10/27/2011 02:09 PM, Frédéric Delanoy wrote: >> On Thu, Oct 27, 2011 at 08:38, Eric Pouech wrote: >>> why do we check for ptr being null or not, when we deref ptr one line above? >>       if (*ptr == '\n') ptr++; -      WCMD_output_asis_len(message, (p

Re: cmd: Avoid mixing signed and unsigned type in conditional expression

2011-10-27 Thread Michael Stefaniuc
On 10/27/2011 02:09 PM, Frédéric Delanoy wrote: > On Thu, Oct 27, 2011 at 08:38, Eric Pouech wrote: >> why do we check for ptr being null or not, when we deref ptr one line above? > >>> if (*ptr == '\n') ptr++; >>> - WCMD_output_asis_len(message, (ptr) ? ptr - message : >>> strlenW(mes

Re: cmd: Avoid mixing signed and unsigned type in conditional expression

2011-10-27 Thread Frédéric Delanoy
2011/10/27 Frédéric Delanoy : > On Thu, Oct 27, 2011 at 08:38, Eric Pouech wrote: >> why do we check for ptr being null or not, when we deref ptr one line above? > >>>       if (*ptr == '\n') ptr++; >>> -      WCMD_output_asis_len(message, (ptr) ? ptr - message : >>> strlenW(message), handle); >>>

Re: cmd: Avoid mixing signed and unsigned type in conditional expression

2011-10-27 Thread Frédéric Delanoy
On Thu, Oct 27, 2011 at 08:38, Eric Pouech wrote: > why do we check for ptr being null or not, when we deref ptr one line above? >>       if (*ptr == '\n') ptr++; >> -      WCMD_output_asis_len(message, (ptr) ? ptr - message : >> strlenW(message), handle); >> +      WCMD_output_asis_len(message,

Re: cmd: Avoid mixing signed and unsigned type in conditional expression

2011-10-26 Thread Eric Pouech
why do we check for ptr being null or not, when we deref ptr one line above ? something's wrong in the code logic A+ Le 27 octobre 2011 04:53, Frédéric Delanoy a écrit : > --- > programs/cmd/wcmdmain.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/programs/cmd/w