Unomitted frame pointers

Dave Korn dave.korn@artimi.com
Fri Dec 10 16:40:00 GMT 2004


> -----Original Message-----
> From: Andreas Schwab [mailto:schwab@suse.de] 
> Sent: 10 December 2004 16:33

> "Dave Korn" writes:
> 
> >   So really the safe way to code this is
> >
> > #define HELLOSTRING "Hello World!\n"
> >
> >       write (2, HELLOSTRING, strlen(HELLOSTRING)-1);
> 
> No, it's
> 
>         write (2, HELLOSTRING, strlen(HELLOSTRING));
> 
> Andreas.
> 


  Duh.  Yes, of course I needn't allow for the NUL-terminator......


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Gcc mailing list