Consistency
This commit is contained in:
parent
d021510bad
commit
7e121a6b63
|
@ -326,8 +326,7 @@ writepid()
|
|||
int fd;
|
||||
struct flock fl;
|
||||
|
||||
fd = open(LOCKFILE, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
if (fd == -1) {
|
||||
if ((fd = open(LOCKFILE, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) {
|
||||
perror("writepid - open");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -50,8 +50,7 @@ sendsignal(int sig, union sigval sv)
|
|||
int fd;
|
||||
struct flock fl;
|
||||
|
||||
fd = open(LOCKFILE, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
if ((fd = open(LOCKFILE, O_RDONLY)) == -1) {
|
||||
if (errno == ENOENT) {
|
||||
fputs("Error: no running instance of dwmblocks.\n", stderr);
|
||||
exit(3);
|
||||
|
|
Loading…
Reference in a new issue