diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-02-20 14:19:41 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-02-20 15:27:30 +0100 |
commit | 6e01955b303a75b2b955c67480b413d900ff10b1 (patch) | |
tree | c7dceacfdb29fdb22ddb02800db73ee195fe4d52 /src/shared/hwdb-util.c | |
parent | 650a4a956592c06123a39e67d32f78db24591b97 (diff) | |
download | systemd-6e01955b303a75b2b955c67480b413d900ff10b1.tar.gz |
shared/hwdb-util: drop "variable" with a single use
In 6a34639e76b8b59233a97533b13836d5a44e8d4a arg_hwdb_bin_dir was replaced by
default_hwdb_bin_dir, which is constant. Generally we'd use a #define instead,
but since there's just one use, let's just avoid the indirection altogether.
Diffstat (limited to 'src/shared/hwdb-util.c')
-rw-r--r-- | src/shared/hwdb-util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c index 0ff686d24b..45910a36e3 100644 --- a/src/shared/hwdb-util.c +++ b/src/shared/hwdb-util.c @@ -21,8 +21,7 @@ #include "strv.h" #include "tmpfile-util.h" -static const char *default_hwdb_bin_dir = "/etc/udev"; -static const char * const conf_file_dirs[] = { +static const char* const conf_file_dirs[] = { "/etc/udev/hwdb.d", UDEVLIBEXECDIR "/hwdb.d", NULL @@ -634,7 +633,7 @@ int hwdb_update(const char *root, const char *hwdb_bin_dir, bool strict, bool co log_debug("strings dedup'ed: %8zu bytes (%8zu)", trie->strings->dedup_len, trie->strings->dedup_count); - hwdb_bin = path_join(root, hwdb_bin_dir ?: default_hwdb_bin_dir, "hwdb.bin"); + hwdb_bin = path_join(root, hwdb_bin_dir ?: "/etc/udev", "hwdb.bin"); if (!hwdb_bin) return -ENOMEM; |