Don't initialize with 0.
[kopensolaris-gnu/glibc.git] / locale / duplocale.c
index 7b188ef..2dcc0f5 100644 (file)
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <locale.h>
-#include <libc-lock.h>
+#include <bits/libc-lock.h>
 #include <stdlib.h>
 
 #include <localeinfo.h>
@@ -45,7 +45,7 @@ __duplocale (__locale_t dataset)
       for (cnt = 0; cnt < LC_ALL; ++cnt)
        {
          result->__locales[cnt] = dataset->__locales[cnt];
-         if (result->__locales[cnt]->usage_count != MAX_USAGE_COUNT)
+         if (result->__locales[cnt]->usage_count < MAX_USAGE_COUNT)
            ++result->__locales[cnt]->usage_count;
        }
     }