mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
Chore (Linux): code cleanup
This commit is contained in:
@@ -179,7 +179,7 @@ static bool detectDebianDerived(FFOSResult* result)
|
||||
ffStrbufSetS(&result->idLike, "debian");
|
||||
return true;
|
||||
}
|
||||
else if (ffPathExists("/usr/bin/pveversion", FF_PATHTYPE_FILE))
|
||||
else if (access("/usr/bin/pveversion", X_OK) == 0)
|
||||
{
|
||||
ffStrbufSetS(&result->id, "pve");
|
||||
ffStrbufSetS(&result->idLike, "debian");
|
||||
|
||||
@@ -66,7 +66,7 @@ static uint32_t getMacPortsPackages()
|
||||
return countMacPortsPackages(FASTFETCH_TARGET_DIR_ROOT "/opt/local");
|
||||
}
|
||||
|
||||
static uint32_t getNixPackagesImpl(char* path)
|
||||
static uint32_t getNixPackagesImpl(const char* path)
|
||||
{
|
||||
//Nix detection is kinda slow, so we only do it if the dir exists
|
||||
if(!ffPathExists(path, FF_PATHTYPE_DIRECTORY))
|
||||
@@ -87,7 +87,7 @@ static uint32_t getNixPackagesImpl(char* path)
|
||||
NULL
|
||||
});
|
||||
|
||||
return (uint32_t) strtol(output.chars, NULL, 10);
|
||||
return (uint32_t) strtoul(output.chars, NULL, 10);
|
||||
}
|
||||
|
||||
static uint32_t getNixPackages(FFstrbuf* baseDir, const char* dirname)
|
||||
|
||||
Reference in New Issue
Block a user