(setlocale): Don't set usage_count to MAX_USAGE_COUNT if it already
authordrepper <drepper>
Sun, 9 Mar 1997 06:04:54 +0000 (06:04 +0000)
committerdrepper <drepper>
Sun, 9 Mar 1997 06:04:54 +0000 (06:04 +0000)
has this value.

locale/setlocale.c

index 12e6569..4eceea6 100644 (file)
@@ -368,7 +368,8 @@ setlocale (int category, const char *locale)
 
          /* We must not simply free a global locale since we have no
             control over the usage.  So we mark it as un-deletable.  */
-         newdata->usage_count = MAX_USAGE_COUNT;
+         if (newdata->usage_count != MAX_USAGE_COUNT)
+           newdata->usage_count = MAX_USAGE_COUNT;
        }
 
       /* Create new composite name.  */