[Groonga-commit] groonga/groonga [master] Indent

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 5 22:23:01 JST 2012


Kouhei Sutou	2012-11-05 22:23:01 +0900 (Mon, 05 Nov 2012)

  New Revision: 8c81f79291d275935ff67d9827b6ef83fc57aaa3
  https://github.com/groonga/groonga/commit/8c81f79291d275935ff67d9827b6ef83fc57aaa3

  Log:
    Indent

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+19 -19)
===================================================================
--- src/groonga.c    2012-11-05 22:22:47 +0900 (fac4d10)
+++ src/groonga.c    2012-11-05 22:23:01 +0900 (d811200)
@@ -1778,27 +1778,27 @@ static const char * const default_bind_address = "0.0.0.0";
 static void
 init_default_hostname(void)
 {
-    static char hostname[HOST_NAME_MAX + 1];
-    hostname[HOST_NAME_MAX] = '\0';
-    if (gethostname(hostname, HOST_NAME_MAX)) {
-      fprintf(stderr, "gethostname failed: %s\n", strerror(errno));
+  static char hostname[HOST_NAME_MAX + 1];
+  hostname[HOST_NAME_MAX] = '\0';
+  if (gethostname(hostname, HOST_NAME_MAX)) {
+    fprintf(stderr, "gethostname failed: %s\n", strerror(errno));
+  } else {
+    int error_code;
+    struct addrinfo hints, *result;
+    memset(&hints, 0, sizeof(hints));
+    hints.ai_family = AF_UNSPEC;
+    hints.ai_socktype = SOCK_STREAM;
+    hints.ai_addr = NULL;
+    hints.ai_canonname = NULL;
+    hints.ai_next = NULL;
+    error_code = getaddrinfo(hostname, NULL, &hints, &result);
+    if (error_code) {
+      fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(error_code));
     } else {
-      int error_code;
-      struct addrinfo hints, *result;
-      memset(&hints, 0, sizeof(hints));
-      hints.ai_family = AF_UNSPEC;
-      hints.ai_socktype = SOCK_STREAM;
-      hints.ai_addr = NULL;
-      hints.ai_canonname = NULL;
-      hints.ai_next = NULL;
-      error_code = getaddrinfo(hostname, NULL, &hints, &result);
-      if (error_code) {
-        fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(error_code));
-      } else {
-        freeaddrinfo(result);
-        default_hostname = hostname;
-      }
+      freeaddrinfo(result);
+      default_hostname = hostname;
     }
+  }
 }
 
 static void
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index