----- Original Message ----- From: "Anton Alin-Adrian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 22, 2004 5:27 PM Subject: fopen("file","a")
> Hey folks. > > Running FreeBSD 4.9-RELEASE > > I am just wondering: > > man fopen > ---man--- > Upon successful completion fopen(), fdopen() and freopen() return a > FILE pointer. Otherwise, NULL is returned and the global variable errno is > set to indicate the error. > ---man--- > > > However, the following snippet: > > --snip-- > FILE *fp_queue; > > if ( (fp_queue=fopen(fqueue,"a")) ==NULL);//will wait for locks > { > perror("fopen(fqueue,\"a\")"); > //exit(EXIT_FAILURE); > } > --snip-- > > You have a semicolon after your if... looks like a typo, but that will mean the perror always gets called. Regards, Stuart _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"