summaryrefslogtreecommitdiff
path: root/src/host.c
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-19 23:52:56 +0900
committer諏訪子 <suwako@076.moe>2024-06-19 23:52:56 +0900
commitb6e3f6cb5d1051777c35988f201e6730525e3389 (patch)
tree98679f1995f7b103f3314ce54fdf0d1c76df6dbd /src/host.c
parent8f378429801162d690dc68c0f15b483c1d291838 (diff)
掃除
Diffstat (limited to 'src/host.c')
-rw-r--r--src/host.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/host.c b/src/host.c
index 03b2f2c..ee88778 100644
--- a/src/host.c
+++ b/src/host.c
@@ -6,8 +6,6 @@
#if defined(__linux__)
#include <unistd.h>
-
-int skip = 0;
#endif
const char *run_host_command(const char *command) {
@@ -38,8 +36,7 @@ const char *run_host_command(const char *command) {
strstr(buf, "INVALID") != NULL ||
strstr(buf, "All Series") != NULL
) {
- skip = 1;
- break;
+ return NULL;
}
#endif
@@ -113,7 +110,7 @@ void display_host_model() {
if (cmd2) {
const char *model = run_host_command(cmd2);
- if (!skip) printf(" %s", model);
+ if (model) printf(" %s", model);
}
#elif defined(__APPLE__)
printf("%s", run_host_command("sysctl -n hw.model"));