[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: glibc/gcc questions



On Mon, Apr 12, 1999 at 01:49:03AM -0500, David Welton wrote:
 
> Second, any idea why this wouldn't work?:
> 
> strncpy(oldnick, nickname,
> #ifdef ALLOW_LONG_NICKNAMES
> 		    LONG_NICKNAME_LEN
> #else
> 		    NICKNAME_LEN
> #endif
> 		    );

I think it should work. But I would do it somewhere else. This does not look
very nice. How about

#ifdef ALLOW_LONG_NICKNAMES
#define NICKNAME_LEN    <old value of LONG_NICKNAME_LEN>
#else
#define NICKNAME_LEN    <original value of NICKNAME_LEN>
#endif

Just my 0.02 DM ;)

cu
    Torsten

Attachment: pgpR4TDblXkwk.pgp
Description: PGP signature


Reply to: