mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtcm: Coverity 89265
This commit is contained in:
parent
3b85e48a68
commit
4ee5f3d3cf
1 changed files with 1 additions and 4 deletions
|
@ -327,14 +327,11 @@ lock_it(void)
|
||||||
locker.l_len = 0;
|
locker.l_len = 0;
|
||||||
#endif /* SVR4 */
|
#endif /* SVR4 */
|
||||||
|
|
||||||
strcpy (buff, dir);
|
|
||||||
strcat (buff, "/.lock.");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* /var/spool might be mounted. Use .lock.hostname to
|
* /var/spool might be mounted. Use .lock.hostname to
|
||||||
* prevent more than one cms running in each host.
|
* prevent more than one cms running in each host.
|
||||||
*/
|
*/
|
||||||
strcat(buff, _DtCmGetLocalHost());
|
snprintf(buff, sizeof(buff), "%s/.lock.%s", dir, _DtCmGetLocalHost());
|
||||||
|
|
||||||
fd = open(buff, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
|
fd = open(buff, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
|
Loading…
Reference in a new issue