]> andersk Git - moira.git/blobdiff - update/hostname.c
Code style cleanup. (No functional changes)
[moira.git] / update / hostname.c
index 1cb89e37fa04a8d5a9378539727a632102a3297a..081d731cf6d54a5bf5a7d54ec52af961d2259f9e 100644 (file)
@@ -18,21 +18,23 @@ static char *rcsid_hostname_c = "$Header$";
 #include <netdb.h>
 #include <ctype.h>
 #include <string.h>
-char *
-PrincipalHostname(alias)
-     char *alias;
+
+char *PrincipalHostname(char *alias)
 {
-     struct hostent *h;
-     char *phost = alias;
-     if ((h=gethostbyname(alias)) != (struct hostent *)NULL) {
-         char *p = strchr(h->h_name, '.');
-         if (p)
-              *p = NULL;
-         p = phost = h->h_name;
-         do {
-              if (isupper(*p))
-                   *p = tolower(*p);
-         } while (*p++);
-     }
-     return(phost);
+  struct hostent *h;
+  char *phost = alias;
+  if ((h = gethostbyname(alias)))
+    {
+      char *p = strchr(h->h_name, '.');
+      if (p)
+       *p = NULL;
+      p = phost = h->h_name;
+      do
+       {
+         if (isupper(*p))
+           *p = tolower(*p);
+       }
+      while (*p++);
+    }
+  return phost;
 }
This page took 0.069712 seconds and 4 git commands to generate.