Problem found by xlclang 16.1 on AIX 7.2.
* lib/localename.c (duplocale, freelocale):
Omit unnecessary comparison of non-null args to NULL.
+2023-01-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ localename: -Wtautological-pointer-compare
+ Problem found by xlclang 16.1 on AIX 7.2.
+ * lib/localename.c (duplocale, freelocale):
+ Omit unnecessary comparison of non-null args to NULL.
+
2023-01-13 Bruno Haible <bruno@clisp.org>
login_tty tests: Be more verbose when the test fails.
struct locale_hash_node *node;
locale_t result;
- if (locale == NULL)
- /* Invalid argument. */
- abort ();
-
node = (struct locale_hash_node *) malloc (sizeof (struct locale_hash_node));
if (node == NULL)
/* errno is set to ENOMEM. */
freelocale (locale_t locale)
#undef freelocale
{
- if (locale == NULL || locale == LC_GLOBAL_LOCALE)
+ if (locale == LC_GLOBAL_LOCALE)
/* Invalid argument. */
abort ();