[Groonga-commit] groonga/groonga [master] groonga: use EXIT_FAILURE instead of -1

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 3日 (火) 13:43:49 JST


Kouhei Sutou	2012-04-03 13:43:49 +0900 (Tue, 03 Apr 2012)

  New Revision: 4b22cdc0733acd5368fa32144fb80a0952daa23e

  Log:
    groonga: use EXIT_FAILURE instead of -1

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+5 -5)
===================================================================
--- src/groonga.c    2012-04-03 13:42:29 +0900 (8a599b5)
+++ src/groonga.c    2012-04-03 13:43:49 +0900 (9825864)
@@ -702,7 +702,7 @@ s_output(grn_ctx *ctx, int flags, void *arg)
 static int
 do_alone(int argc, char **argv)
 {
-  int exit_code = -1;
+  int exit_code = EXIT_FAILURE;
   char *path = NULL;
   grn_obj *db;
   grn_ctx ctx_, *ctx = &ctx_;
@@ -773,7 +773,7 @@ c_output(grn_ctx *ctx)
 static int
 g_client(int argc, char **argv)
 {
-  int exit_code = -1;
+  int exit_code = EXIT_FAILURE;
   grn_ctx ctx_, *ctx = &ctx_;
   const char *hostname = DEFAULT_DEST;
   if (argc > 0 && argv) { hostname = *argv++; argc--; }
@@ -1663,7 +1663,7 @@ h_handler(grn_ctx *ctx, grn_obj *msg)
 static int
 h_server(char *path)
 {
-  int exit_code = -1;
+  int exit_code = EXIT_FAILURE;
   grn_com_event ev;
   grn_ctx ctx_, *ctx = &ctx_;
   grn_ctx_init(ctx, 0);
@@ -1846,7 +1846,7 @@ g_handler(grn_ctx *ctx, grn_obj *msg)
 static int
 g_server(char *path)
 {
-  int exit_code = -1;
+  int exit_code = EXIT_FAILURE;
   grn_com_event ev;
   grn_ctx ctx_, *ctx = &ctx_;
   grn_ctx_init(ctx, 0);
@@ -2797,7 +2797,7 @@ main(int argc, char **argv)
     exit_code = do_server(argc > i ? argv[i] : NULL);
     break;
   default:
-    exit_code = -1;
+    exit_code = EXIT_FAILURE;
     break;
   }
 




Groonga-commit メーリングリストの案内
Back to archive index