* nis/nis_domain_of.c (__nis_domain_of): Make the code a bit more
authorUlrich Drepper <drepper@redhat.com>
Fri, 22 Jun 2007 17:01:29 +0000 (17:01 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 22 Jun 2007 17:01:29 +0000 (17:01 +0000)
ISO C compliant.

ChangeLog
nis/nis_domain_of.c

index 5de43cb37090549c45945022fe96e0f46ec38bcc..fb25d0c15e8e6e22cbd64966ce12cd2f99ba4d94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-22  Ulrich Drepper  <drepper@redhat.com>
+
+       * nis/nis_domain_of.c (__nis_domain_of): Make the code a bit more
+       ISO C compliant.
+
 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
 
        * elf/dl-close.c (free_mem): Free _dl_scope_free_list.
index 4d6b48640efa9bfa99a2e430719b4374e729e045..6f41b92bf75b0ae366b8e77132340dc0ba72c025 100644 (file)
@@ -32,10 +32,10 @@ __nis_domain_of (const_nis_name name)
 {
   const_nis_name cptr = strchr (name, '.');
 
-  if (cptr++ == NULL)
+  if (cptr == NULL)
     return "";
 
-  if (*cptr == '\0')
+  if (*++cptr == '\0')
     return ".";
 
   return cptr;