:: Re: [DNG] Dng Digest, Vol 13, Issue…
Top Pagina
Delete this message
Reply to this message
Auteur: aitor_czr
Datum:  
Aan: dng
Onderwerp: Re: [DNG] Dng Digest, Vol 13, Issue 53
I use the '==' operator. For example, in the case of a file:

FILE *fp;

if ( fp = fopen ( "file_name", "w") == NULL) { ... error message, and
exit... }

Aitor.

On 19/10/15 20:04, tilt! <tilt@???> wrote:
> I recommend writing this instead at line 512 of automated_scanner.c:
>
>      if (NULL != (dir = opendir(IFACES_PATH))) {

>
> Reasoning:
>
>      dir = opendir(...)

>
> is an assignment that lets "dir" be "NULL" in case of error (it is
> documented in the manpage of opendir(3) that it returns NULL in case of
> error).