Global: remove unexpected trailing line endings

Ref: https://github.com/fastfetch-cli/fastfetch/pull/671#issuecomment-1867777472
This commit is contained in:
Carter Li
2023-12-23 00:06:37 +08:00
committed by 李通洲
parent e85a4b9ff5
commit cf98e6f5a1
12 changed files with 85 additions and 79 deletions
+7 -4
View File
@@ -41,13 +41,16 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options)
{
snprintf(pathSysBlock, PATH_MAX, "/sys/block/%s/device/vendor", devName);
ffAppendFileBuffer(pathSysBlock, &device->name);
if (device->name.length > 0)
ffStrbufAppendC(&device->name, ' ');
if (ffAppendFileBuffer(pathSysBlock, &device->name))
{
ffStrbufTrimRightSpace(&device->name);
if (device->name.length > 0)
ffStrbufAppendC(&device->name, ' ');
}
snprintf(pathSysBlock, PATH_MAX, "/sys/block/%s/device/model", devName);
ffAppendFileBuffer(pathSysBlock, &device->name);
ffStrbufTrim(&device->name, ' ');
ffStrbufTrimRightSpace(&device->name);
if (device->name.length == 0)
ffStrbufSetS(&device->name, devName);