]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapsearch.c
detect and use fcntl (for BSD/OS)
[openldap] / clients / tools / ldapsearch.c
index dd47ecbb03f6cdb0b942dd010c6971e5b9ae2461..58c86d3f72a5c08d8b5e1ac8847480ab0eaa23df 100644 (file)
@@ -1075,7 +1075,8 @@ print_entry(
                                                continue;
                                        }
 
-                                       if (( tmpfd = open( tmpfname, O_WRONLY|O_CREAT|O_EXCL, 0600 )) == -1 ) {
+                                       tmpfd = open( tmpfname, O_WRONLY|O_CREAT|O_EXCL, 0600 );
+                                       if ( tmpfd == -1 ) {
                                                perror( tmpfname );
                                                continue;
                                        }