mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-09 23:34:14 +01:00
Coverity: fix WPrefs appearance time of check time of use
This commit is contained in:
committed by
Carlos R. Mafra
parent
9e59d19507
commit
e9717ed719
@@ -1831,7 +1831,7 @@ static void createPanel(Panel * p)
|
||||
panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
|
||||
|
||||
if (access(panel->fprefix, F_OK) != 0) {
|
||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
||||
werror("%s", panel->fprefix);
|
||||
ok = False;
|
||||
}
|
||||
@@ -1841,7 +1841,7 @@ static void createPanel(Panel * p)
|
||||
wfree(panel->fprefix);
|
||||
panel->fprefix = tmp;
|
||||
if (access(panel->fprefix, F_OK) != 0) {
|
||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
||||
werror("%s", panel->fprefix);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user