I agree. '\0' is much more clear. I also found it strange when I looked the code.
On Tue, Jul 19, 2011 at 7:08 AM, Rodolfo kix Garcia <[email protected]> wrote: > On Tue, 19 Jul 2011 07:23:34 +0800, Paul Harris wrote: > >> On 19 July 2011 01:40, Rodolfo kix Garcia wrote: >> >> On 17/07/11 12:05, Christophe CURIS wrote: >>> >>> Hello, >>>> >>>> I was happy to discover that WindowMaker is still alive! So >>>> please find >>>> attached my very modest contribution to the aventure. >>>> >>>> Basically, there were some cases of "strncpy" usages that could >>>> lead to a >>>> missing NUL terminator, so this should help. >>>> >>>> Regards, >>>> Christophe >>>> >>> >>> Hi, >>> >>> is this line correct? >>> >>> + title[MAX_WORKSPACENAME_WIDTH] = >>> 0; >>> >>> or is: >>> >>> + title[MAX_WORKSPACENAME_WIDTH] = >>> ''; >>> >> >> Those two lines are equivalent. >> '' is equal to zero. >> >> >> Links: >> ------ >> [1] mailto:[email protected] >> > > Umm, > > I never see that. But 0 is int and '\0' is char. it should show a warning, > not? > > > -- > ||// //\\// Rodolfo "kix" Garcia > ||\\// //\\ http://www.kix.es/ > > > -- > To unsubscribe, send mail to wmaker-dev-unsubscribe@lists.** > windowmaker.org <[email protected]>. > -- ============================================================= Haroldo Gambini Santos Computing Department - Universidade Federal de Ouro Preto - UFOP email: haroldo [at ] iceb.ufop.br home/research page: www.decom.ufop.br/haroldo/ "Computer science is no more about computers than astronomy is about telescopes." Edsger Dijkstra
