mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v1.02] Remove wrong check in udev
This commit is contained in:
@@ -166,7 +166,6 @@ long get_l3_cache_size(uint32_t core) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int get_num_caches_from_files(char** paths, int num_paths) {
|
int get_num_caches_from_files(char** paths, int num_paths) {
|
||||||
int SHARED_MAP_MAX_LEN = 8 + 1;
|
|
||||||
int filelen;
|
int filelen;
|
||||||
char* buf;
|
char* buf;
|
||||||
uint32_t* shared_maps = emalloc(sizeof(uint32_t *) * num_paths);
|
uint32_t* shared_maps = emalloc(sizeof(uint32_t *) * num_paths);
|
||||||
@@ -178,11 +177,6 @@ int get_num_caches_from_files(char** paths, int num_paths) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(filelen > SHARED_MAP_MAX_LEN) {
|
|
||||||
printBug("Shared map length is %d while the max is be %d", filelen, SHARED_MAP_MAX_LEN);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char* end;
|
char* end;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
long ret = strtol(buf, &end, 16);
|
long ret = strtol(buf, &end, 16);
|
||||||
|
|||||||
Reference in New Issue
Block a user