Only give exit status of 0=OK if we really mean it (Mantis bug #26)

This commit is contained in:
Andrew Johnson
2003-08-18 20:55:46 +00:00
parent 9cd9257c4a
commit 39cfb6b05a
+3 -3
View File
@@ -48,7 +48,7 @@ int main(int argc,char **argv)
"-S substitutions -S substitutions"
" file1.dbd file2.dbd ...\n");
fprintf(stderr,"Specifying path will replace the default '.'\n");
exit(0);
exit(1);
}
while((strncmp(argv[1],"-I",2)==0)||(strncmp(argv[1],"-S",2)==0)) {
if(strncmp(argv[1],"-I",2)==0) {
@@ -76,7 +76,7 @@ int main(int argc,char **argv)
"-S substitutions -S substitutions"
" file1.dbd file2.dbd ...\n");
fprintf(stderr,"Specifying path will replace the default '.'\n");
exit(0);
exit(1);
}
for(i=1; i<argc; i++) {
status = dbReadDatabase(&pdbbase,argv[i],path,sub);
@@ -92,5 +92,5 @@ int main(int argc,char **argv)
dbWriteRecordFP(pdbbase,stdout,0,0);
free((void *)path);
free((void *)sub);
return(0);
return (status ? 1 : 0);
}