network,sd-hwdb: voidify fchmod()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 May 2021 10:41:03 +0000 (19:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 May 2021 10:41:07 +0000 (19:41 +0900)
Fixes CID#1453294.

src/libsystemd/sd-hwdb/hwdb-util.c
src/network/networkd-lldp-rx.c

index fd45ff0f548f2f7cc986ecc8a79ed1f80e426027..8964a40e38cea38c0d30a2ed0bae03314803c7ac 100644 (file)
@@ -377,7 +377,7 @@ static int trie_store(struct trie *trie, const char *filename, bool compat) {
         r = fopen_temporary(filename, &t.f, &filename_tmp);
         if (r < 0)
                 return r;
-        fchmod(fileno(t.f), 0444);
+        (void) fchmod(fileno(t.f), 0444);
 
         /* write nodes */
         if (fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET) < 0)
index 5b1b90cdd3deb0210dbfaa19eaebf9e24b1e8c63..d781f443d6889ba1ebc3571bc4633b199e68a6fa 100644 (file)
@@ -163,7 +163,7 @@ int link_lldp_save(Link *link) {
         if (r < 0)
                 goto finish;
 
-        fchmod(fileno(f), 0644);
+        (void) fchmod(fileno(f), 0644);
 
         for (i = 0; i < n; i++) {
                 const void *p;