Package: code cleanup

This commit is contained in:
李通洲
2024-02-21 15:40:04 +08:00
parent 6a0c7ca788
commit 4e9ee9aa03
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -290,7 +290,7 @@ static void getPackageCountsBedrock(FFstrbuf* baseDir, FFPackagesResult* package
ffStrbufAppendS(baseDir, "/bedrock/strata");
DIR* dir = opendir(baseDir->chars);
FF_AUTO_CLOSE_DIR DIR* dir = opendir(baseDir->chars);
if(dir == NULL)
{
ffStrbufSubstrBefore(baseDir, baseDirLength);
@@ -313,7 +313,6 @@ static void getPackageCountsBedrock(FFstrbuf* baseDir, FFPackagesResult* package
ffStrbufSubstrBefore(baseDir, baseDirLength2);
}
closedir(dir);
ffStrbufSubstrBefore(baseDir, baseDirLength);
}
+2 -2
View File
@@ -28,7 +28,7 @@ void ffPrintPackages(FFPackagesOptions* options)
{ \
printf("%u (%s)", counts.var, (name)); \
if((all -= counts.var) > 0) \
printf(", "); \
fputs(", ", stdout); \
};
#define FF_PRINT_PACKAGE(name) FF_PRINT_PACKAGE_NAME(name, #name)
@@ -40,7 +40,7 @@ void ffPrintPackages(FFPackagesOptions* options)
if(counts.pacmanBranch.length > 0)
printf("[%s]", counts.pacmanBranch.chars);
if((all -= counts.pacman) > 0)
printf(", ");
fputs(", ", stdout);
};
FF_PRINT_PACKAGE(dpkg)