fix coverity Defect Type: Memory - Uninitialized variables issues
Created attachment 446014 [details] Patch for cov#15511
Created attachment 446023 [details] Patch for cov#15518
(In reply to comment #3) > Created attachment 446023 [details] > Patch for cov#15518 I'm sure it won't happen, but could you check fd with 3 instead of 0? (we want to clearly say we won't close STDIN and STDERR... :) - if (fd != FD_STDOUT) { + if ((fd >= 0) && (fd != FD_STDOUT)) { ^ 3 Then, we don't need to check with FD_STDOUT... Probably, we want to do "if (fd > STDERR_FILENO)"? STDERR_FILENO is defined in unistd.h which is included in back-ldbm.h. Also, instead of defining a macro in the file, we may want to use STDOUT_FILENO... ldap/servers/slapd/back-ldbm/ldif2ldbm.c 888 #define FD_STDOUT 1 889
Created attachment 446044 [details] Patch for cov#15518
Pushed patches to master. Thanks to Noriko for her reviews! Counting objects: 23, done. Delta compression using 2 threads. Compressing objects: 100% (14/14), done. Writing objects: 100% (14/14), 2.12 KiB, done. Total 14 (delta 9), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 44e10f3..cd99e19 master -> master
Coverity Related, Can I request Dev to test this.