Re: glibc/gcc questions
On Tue, Apr 13, 1999 at 04:37:32PM +0200, Torsten Landschoff wrote:
> 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
The problem is that strncpy is defined as a macro. Hrmm. I'm not
sure what to think about this, if the code is buggy, making
assumptions about being able to do things like that, or if there is a
bug somewhere else. BTW, you'll only get this if you compile with -O.
Ciao,
--
David N. Welton | Fortune rota volvitur - descendo minoratus
davidw@prosa.it | alter in altum tollitur - nimis exaltatus
http://www.efn.org/~davidw | rex sedet in vertice - caveat ruinam!
www.debian.org - www.prosa.it | nam sub axe legimus - Hecubam reginam
Reply to: