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:
parent
af58b6be10
commit
3c72e21cb2
1 changed files with 2 additions and 2 deletions
|
@ -210,7 +210,7 @@ int main(int argc, XeString *argv)
|
||||||
log_path = XeSBTempPath((XeString)"DTSPCD.log");
|
log_path = XeSBTempPath((XeString)"DTSPCD.log");
|
||||||
|
|
||||||
if(NULL == freopen("/dev/null", "w", stderr)) {
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ int main(int argc, XeString *argv)
|
||||||
SPC_Open_Log(log_path, FALSE);
|
SPC_Open_Log(log_path, FALSE);
|
||||||
SPC_Print_Protocol = spc_logF;
|
SPC_Print_Protocol = spc_logF;
|
||||||
if(NULL == (stderr = freopen(log_path, "a", stderr))) {
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
setbuf(stderr, NULL);
|
setbuf(stderr, NULL);
|
||||||
|
|
Loading…
Reference in a new issue