aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-07-02 11:49:25 +0200
committerMattias Andrée <maandree@kth.se>2023-07-02 11:49:25 +0200
commit1575e15fee19390fa7d73bbdededf37587701e7e (patch)
tree0b1d965785b47bd4760a32db6e72a1b1f745b275
parentlibbus.c: handle fopen() errors in bus_open (diff)
downloadbus-1575e15fee19390fa7d73bbdededf37587701e7e.tar.gz
bus-1575e15fee19390fa7d73bbdededf37587701e7e.tar.bz2
bus-1575e15fee19390fa7d73bbdededf37587701e7e.tar.xz
Style fix3.1.10
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--libbus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libbus.c b/libbus.c
index b691940..85fbdb6 100644
--- a/libbus.c
+++ b/libbus.c
@@ -669,10 +669,8 @@ bus_open(bus_t *restrict bus, const char *restrict file, int flags)
bus->message = NULL;
f = fopen(file, "r");
-
- if (f == NULL) {
+ if (!f)
goto fail;
- }
t(getline(&line, &len, f));
t(bus->key_sem = (key_t)atoll(line));