ig this is even less stupid
This commit is contained in:
@@ -70,7 +70,7 @@ inline char *pretty_bytes(const uint64_t bytes, int8_t start_suffix, char *buf,
|
||||
int get_hwmon_dir(char *path, const size_t bufsz) {
|
||||
glob_t g;
|
||||
|
||||
strcpy(path + strlen(path), "/hwmon*");
|
||||
strcat(path, "/hwmon*");
|
||||
|
||||
if (glob(path, 0, NULL, &g) == 0) {
|
||||
strlcpy(path, g.gl_pathv[0], bufsz); // same size as hwmon length, careful
|
||||
|
||||
Reference in New Issue
Block a user