diff options
Diffstat (limited to 'locale')
| -rw-r--r-- | locale/programs/xmalloc.c | 12 | ||||
| -rw-r--r-- | locale/setlocale.c | 2 | ||||
| -rw-r--r-- | locale/uselocale.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/locale/programs/xmalloc.c b/locale/programs/xmalloc.c index 4ae46b9003..38f2bc8a2c 100644 --- a/locale/programs/xmalloc.c +++ b/locale/programs/xmalloc.c @@ -56,10 +56,10 @@ fixup_null_alloc (size_t n) { VOID *p; - p = 0; + p = NULL; if (n == 0) p = malloc ((size_t) 1); - if (p == 0) + if (p == NULL) error (xmalloc_exit_failure, 0, _("memory exhausted")); return p; } @@ -72,7 +72,7 @@ xmalloc (size_t n) VOID *p; p = malloc (n); - if (p == 0) + if (p == NULL) p = fixup_null_alloc (n); return p; } @@ -85,7 +85,7 @@ xcalloc (size_t n, size_t s) VOID *p; p = calloc (n, s); - if (p == 0) + if (p == NULL) p = fixup_null_alloc (n); return p; } @@ -97,10 +97,10 @@ xcalloc (size_t n, size_t s) VOID * xrealloc (VOID *p, size_t n) { - if (p == 0) + if (p == NULL) return xmalloc (n); p = realloc (p, n); - if (p == 0) + if (p == NULL) p = fixup_null_alloc (n); return p; } diff --git a/locale/setlocale.c b/locale/setlocale.c index 7bd27e5398..fc5bf5c427 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -52,7 +52,7 @@ static char *const _nl_current_used[] = # undef DEFINE_CATEGORY }; -# define CATEGORY_USED(category) (_nl_current_used[category] != 0) +# define CATEGORY_USED(category) (_nl_current_used[category] != NULL) #else diff --git a/locale/uselocale.c b/locale/uselocale.c index 8136caf61b..5c7c1ad66b 100644 --- a/locale/uselocale.c +++ b/locale/uselocale.c @@ -54,7 +54,7 @@ __uselocale (locale_t newloc) extern char _nl_current_##category##_used; \ weak_extern (_nl_current_##category##_used) \ weak_extern (_nl_current_##category) \ - if (&_nl_current_##category##_used != 0) \ + if (&_nl_current_##category##_used != NULL) \ _nl_current_##category = &locobj->__locales[category]; \ } # include "categories.def" |
