Hi,

I start reading libc/locale code in order to understanding it.

Here a patch to remove an unused argument "isspecial" from static
function "load_locale_sub".

The function is called once, with isspecial=0, and the argument isn't
used in function's body.

Any comments ?
-- 
Sébastien Marie


Index: locale/setlocale.c
===================================================================
RCS file: /cvs/src/lib/libc/locale/setlocale.c,v
retrieving revision 1.20
diff -u -p -r1.20 setlocale.c
--- locale/setlocale.c  28 Aug 2013 16:53:34 -0000      1.20
+++ locale/setlocale.c  9 Jun 2015 17:40:42 -0000
@@ -77,7 +77,7 @@ static char current_locale_string[_LC_LA
 
 static char    *currentlocale(void);
 static void revert_to_default(int);
-static int load_locale_sub(int, const char *, int);
+static int load_locale_sub(int, const char *);
 static char    *loadlocale(int);
 static const char *__get_locale_env(int);
 
@@ -238,7 +238,7 @@ set_lc_messages_locale(const char *locna
 }
 
 static int
-load_locale_sub(int category, const char *locname, int isspecial)
+load_locale_sub(int category, const char *locname)
 {
        /* check for the default locales */
        if (!strcmp(new_categories[category], "C") ||
@@ -278,7 +278,7 @@ loadlocale(int category)
            current_categories[category]) == 0)
                return (current_categories[category]);
 
-       if (!load_locale_sub(category, new_categories[category], 0)) {
+       if (!load_locale_sub(category, new_categories[category])) {
                (void)strlcpy(current_categories[category],
                    new_categories[category], 
sizeof(current_categories[category]));
                return current_categories[category];

Reply via email to