1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtspcd: coverity CID 174742; potential NULL derefs

This commit is contained in:
Jon Trulson 2018-03-31 14:24:13 -06:00
parent af58b6be10
commit 3c72e21cb2

View file

@ -210,7 +210,7 @@ int main(int argc, XeString *argv)
log_path = XeSBTempPath((XeString)"DTSPCD.log");
if(NULL == freopen("/dev/null", "w", stderr)) {
fprintf(stderr, "Unable to open /dev/null\n");
printf("Unable to open /dev/null\n");
exit(EXIT_FAILURE);
}
@ -229,7 +229,7 @@ int main(int argc, XeString *argv)
SPC_Open_Log(log_path, FALSE);
SPC_Print_Protocol = spc_logF;
if(NULL == (stderr = freopen(log_path, "a", stderr))) {
fprintf(stderr, "Unable to reopen '%s' as stderr\n", log_path);
printf("Unable to reopen '%s' as stderr\n", log_path);
exit(EXIT_FAILURE);
}
setbuf(stderr, NULL);