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