Small syntactic changes

This commit is contained in:
Linus Dierheimer
2022-01-08 21:58:37 +01:00
parent 0879746e0f
commit 31d0729cdd
2 changed files with 4 additions and 11 deletions
+3 -5
View File
@@ -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);
+1 -6
View File
@@ -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;
}