use increment operator

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Ari Archer 2024-05-04 01:37:10 +03:00
parent fa7b78f1ff
commit 9ec65ebd37
No known key found for this signature in database
GPG key ID: A50D5B4B599AF8A2

View file

@ -257,8 +257,8 @@ unsigned char CPU_init(CPU *cpu) {
if (strncmp(line, "model name", 10) == 0) {
strncpy(cpu->model, strchr(line, ':') + 2, 64);
cpu->model[strcspn(cpu->model, "\n")] = 0;
} else if (strncmp(line, "processor", 9) == 0 && cpu->core_count < 255)
cpu->core_count += 1;
} else if (cpu->core_count < 255 && strncmp(line, "processor", 9) == 0)
++cpu->core_count;
fclose(fp_cpu);