Skip to content

Commit

Permalink
Locale: remove usage of LC_MESSAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Aug 23, 2024
1 parent 7e9a130 commit 85bfe27
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/common/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ void ffInitInstance(void)
#else
// Never use `setlocale(LC_ALL, "")`
setlocale(LC_TIME, "");
#ifdef LC_MESSAGES
setlocale(LC_MESSAGES, "");
#endif
#endif

initState(&instance.state);
Expand Down
10 changes: 0 additions & 10 deletions src/detection/locale/locale_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,9 @@ void ffDetectLocale(FFstrbuf* result)
if(result->length > 0)
return;

ffStrbufAppendS(result, getenv("LC_MESSAGES"));
if(result->length > 0)
return;

ffStrbufAppendS(result, getenv("LANG"));
if(result->length > 0)
return;

#ifdef LC_MESSAGES
ffStrbufAppendS(result, setlocale(LC_MESSAGES, NULL));
if(result->length > 0)
return;
#endif

ffStrbufAppendS(result, setlocale(LC_TIME, NULL));
}

0 comments on commit 85bfe27

Please sign in to comment.