paleofetch

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f8fd070b672e80b7b9a1cb8beec9dfb1ff83e8ac
parent ad0b6685f5d1229e896e8fa5da5d849a410a6b68
Author: dwzg <dennis@wtzg.de>
Date:   Tue, 28 Apr 2020 21:37:50 +0200

Fix check of wrong file pointer

Diffstat:
Mpaleofetch.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/paleofetch.c b/paleofetch.c @@ -359,14 +359,14 @@ char *get_cpu() { sscanf(line, "%d", &cpu_freq); cpu_freq /= 1000; // convert kHz to MHz } else { - fclose(cpufreq); - free(line); + fclose(cpufreq); + free(line); goto cpufreq_fallback; } } else { cpufreq_fallback: cpufreq = fopen("/proc/cpuinfo", "r"); /* read from cpu info */ - if(cpuinfo == NULL) { + if (cpufreq == NULL) { status = -1; halt_and_catch_fire("Unable to open cpuinfo"); }