Whoops, knew I forgot something :) #define CRYPT(x,y) crypt(x,y)
Why this is done, I don't really know. From the way I understand it, you could simply have said: if (!ch || (strncmp (crypt(argument, GET_PASSWD(ch)), GET_PASSWD (ch), MAX_PWD_LENGTH))) But, would it not be better to simply use strcmp? it only needs 2 arguments, not 3, and from what I see, there's no real difference... I dunno.. Sometimes it really frustrates me to try and understand why some people did things in a certain why. Frans On Fri 24 May 02 13:09, you wrote: > On Fri, May 24, 2002 at 12:57:24PM +0200, SnaRf 'Eadsmacka wrote: > > warning: passing arg 1 of `strncmp' makes pointer from integer without a > > cast > > > > The line it's whining about is: > > if (!ch || (strncmp (CRYPT(argument, GET_PASSWD(ch)), GET_PASSWD (ch), > > MAX_PWD_LENGTH))) > > What the error says is that it expects a pointer, but that you feed > it an integer. Arg 1 of strncmp() is the output of the CRYPT() > macro, which I've never seen before. Show us some more, what does > CRYPT look like? > Edwin

