Global: major FFstrbuf related code refactor

This commit is contained in:
李通洲
2023-04-15 15:29:54 +08:00
parent 2df1305521
commit c7119498a3
76 changed files with 274 additions and 537 deletions
+1 -3
View File
@@ -17,8 +17,7 @@ static void printBattery(FFinstance* instance, FFBatteryOptions* options, Batter
result->status.length > 0 &&
ffStrbufIgnCaseCompS(&result->status, "Unknown") != 0;
FFstrbuf str;
ffStrbufInit(&str);
FF_STRBUF_AUTO_DESTROY str = ffStrbufCreate();
if(result->capacity >= 0)
{
@@ -58,7 +57,6 @@ static void printBattery(FFinstance* instance, FFBatteryOptions* options, Batter
}
ffStrbufPutTo(&str, stdout);
ffStrbufDestroy(&str);
}
else
{