aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2023-04-26 01:02:38 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2023-04-26 01:02:38 -0400
commit562b2be9f2d331d75a357601df12351865e5d841 (patch)
tree9fbfe413d3bff7f24d53009118087e1d4dd89d89
parent99beaf17f0de995d1f0f82598a651d04ace48ff9 (diff)
downloadwhatami-562b2be9f2d331d75a357601df12351865e5d841.tar.gz
bugfix: remove null pointer check because it will always evaluate as true with static character string
-rw-r--r--x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/x86.c b/x86.c
index e7b2f7e..e26271e 100644
--- a/x86.c
+++ b/x86.c
@@ -45,12 +45,12 @@ char *get_sys_product() {
rstrip(vendor);
}
#if defined(__linux__)
- if (!vendor || !strlen(vendor)) {
+ if (!strlen(vendor)) {
strcpy(vendor, get_sys_dmi_product());
rstrip(vendor);
}
#elif defined(__APPLE__)
- if (!vendor || !strlen(vendor)) {
+ if (!strlen(vendor)) {
strcpy(vendor, get_sys_product_darwin());
rstrip(vendor);
}