summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-hwdb
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2020-10-09 14:59:44 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2020-10-09 15:02:23 +0200
commitd7a0f1f4f9910a1a2d290e31b2ba8cfa7126fbdd (patch)
treef519b20cb0835f71bd553abeca761882cad3299b /src/libsystemd/sd-hwdb
parent44e66de0f25e65d5bd8b2f7f848e0fc7b98199ed (diff)
downloadsystemd-d7a0f1f4f9910a1a2d290e31b2ba8cfa7126fbdd.tar.gz
tree-wide: assorted coccinelle fixes
Diffstat (limited to 'src/libsystemd/sd-hwdb')
-rw-r--r--src/libsystemd/sd-hwdb/sd-hwdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
index b3febdbb31..0e326f3d22 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
@@ -343,10 +343,10 @@ _public_ int sd_hwdb_new(sd_hwdb **ret) {
return log_debug_errno(errno, "Failed to map %s: %m", hwdb_bin_path);
if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 ||
- (size_t) hwdb->st.st_size != le64toh(hwdb->head->file_size)) {
- log_debug("Failed to recognize the format of %s", hwdb_bin_path);
- return -EINVAL;
- }
+ (size_t) hwdb->st.st_size != le64toh(hwdb->head->file_size))
+ return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
+ "Failed to recognize the format of %s",
+ hwdb_bin_path);
log_debug("=== trie on-disk ===");
log_debug("tool version: %"PRIu64, le64toh(hwdb->head->tool_version));