diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-04-26 00:54:48 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-04-26 00:54:58 -0400 |
commit | 2c8c1166d81a5c0fe6f335742ee24319ce60bfa8 (patch) | |
tree | c58e738644f9595fae67e2ade0ecec35f8b7eca4 /darwin.c | |
parent | e71c07b9d5cc1236ca08536ae052faa5fc6b9096 (diff) | |
download | whatami-2c8c1166d81a5c0fe6f335742ee24319ce60bfa8.tar.gz |
Use static storage
* Almost everything returned by the system is immutable
* Fixed block_device array initialization and alphabetical sorting
* Free memory where possible
Diffstat (limited to 'darwin.c')
-rw-r--r-- | darwin.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2,12 +2,12 @@ #include "common.h" char *get_sys_product_darwin() { - char model[100] = {0}; + static char model[100] = {0}; size_t len; len = sizeof(model); sysctlbyname("hw.model", model, &len, NULL, 0); - return strdup(model); + return model; } ssize_t get_sys_memory() { |