mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Small syntactic changes
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
//common/libraries.c
|
||||
void* ffLibraryLoad(const FFstrbuf* userProvidedName, ...)
|
||||
{
|
||||
if(userProvidedName->length > 0)
|
||||
@@ -12,13 +11,12 @@ void* ffLibraryLoad(const FFstrbuf* userProvidedName, ...)
|
||||
va_start(defaultNames, userProvidedName);
|
||||
|
||||
void* result = NULL;
|
||||
const char* name = va_arg(defaultNames, const char*);
|
||||
|
||||
while(result == NULL)
|
||||
while(result == NULL && name != NULL)
|
||||
{
|
||||
const char* name = va_arg(defaultNames, const char*);
|
||||
if(name == NULL)
|
||||
break;
|
||||
result = dlopen(name, RTLD_LAZY);
|
||||
name = va_arg(defaultNames, const char*);
|
||||
}
|
||||
|
||||
va_end(defaultNames);
|
||||
|
||||
@@ -394,11 +394,6 @@ void ffParseSemver(FFstrbuf* buffer, const FFstrbuf* major, const FFstrbuf* mino
|
||||
ffStrbufAppend(buffer, patch);
|
||||
}
|
||||
|
||||
static inline bool charIsNegliable(char c)
|
||||
{
|
||||
return c == ' ' || c == '\t' || c == '\n' || c == '\r';
|
||||
}
|
||||
|
||||
bool ffStrSet(const char* str)
|
||||
{
|
||||
if(str == NULL)
|
||||
@@ -406,7 +401,7 @@ bool ffStrSet(const char* str)
|
||||
|
||||
while(*str != '\0')
|
||||
{
|
||||
if(!charIsNegliable(*str))
|
||||
if(*str != ' ' && *str != '\t' && *str != '\n' && *str != '\r')
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user