Consistency

This commit is contained in:
Ashish Kumar Yadav 2021-01-10 13:25:58 +05:30
parent d021510bad
commit 7e121a6b63
2 changed files with 2 additions and 4 deletions

View file

@ -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);
}

View file

@ -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);