diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-04-26 01:02:38 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-04-26 01:02:38 -0400 |
commit | 562b2be9f2d331d75a357601df12351865e5d841 (patch) | |
tree | 9fbfe413d3bff7f24d53009118087e1d4dd89d89 /x86.c | |
parent | 99beaf17f0de995d1f0f82598a651d04ace48ff9 (diff) | |
download | whatami-562b2be9f2d331d75a357601df12351865e5d841.tar.gz |
bugfix: remove null pointer check because it will always evaluate as true with static character string
Diffstat (limited to 'x86.c')
-rw-r--r-- | x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |