diff options
author | Mattias Andrée <maandree@kth.se> | 2023-07-02 11:49:25 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-07-02 11:49:25 +0200 |
commit | 1575e15fee19390fa7d73bbdededf37587701e7e (patch) | |
tree | 0b1d965785b47bd4760a32db6e72a1b1f745b275 | |
parent | libbus.c: handle fopen() errors in bus_open (diff) | |
download | bus-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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)); |