Libc (BSD): always initialize variables

This commit is contained in:
Carter Li
2024-11-03 18:00:45 +08:00
parent 743babda10
commit d216391278
+4 -3
View File
@@ -2,6 +2,9 @@
const char* ffDetectLibc(FFLibcResult* result)
{
result->name = "Unknown";
result->version = NULL;
#ifdef __DragonFly__ // We define `__FreeBSD__` on DragonFly BSD for simplification
result->name = "DF";
#ifdef FF_DF_VERSION
@@ -12,9 +15,7 @@ const char* ffDetectLibc(FFLibcResult* result)
#ifdef FF_FBSD_VERSION
result->version = FF_FBSD_VERSION;
#endif
#else
result->name = "Unknown";
result->version = NULL;
#endif
return NULL;
}