[Groonga-commit] groonga/groonga [master] groonga: fix wrong rc type

Back to archive index

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


Kouhei Sutou	2012-04-03 13:35:38 +0900 (Tue, 03 Apr 2012)

  New Revision: 03e61099bac7a7597397028d71e019523ed7b501

  Log:
    groonga: fix wrong rc type
    
    rc doesn't mean grn_rc... It just return value of a program.

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+3 -3)
===================================================================
--- src/groonga.c    2012-04-03 13:33:19 +0900 (fc5cb3f)
+++ src/groonga.c    2012-04-03 13:35:38 +0900 (75dbf86)
@@ -863,11 +863,11 @@ run_server_loop(grn_ctx *ctx, grn_com_event *ev)
   }
 }
 
-static grn_rc
+static int
 run_server(grn_ctx *ctx, grn_obj *db, grn_com_event *ev,
            grn_edge_dispatcher_func dispatcher, grn_handler_func handler)
 {
-  grn_rc rc = 0;
+  int rc = EXIT_SUCCESS;
   struct hostent *he;
   if (!(he = gethostbyname(hostname))) {
     SERR("gethostbyname");
@@ -876,7 +876,7 @@ run_server(grn_ctx *ctx, grn_obj *db, grn_com_event *ev,
     grn_edges_init(ctx, dispatcher);
     if (!grn_com_sopen(ctx, ev, bind_address, port, handler, he)) {
       run_server_loop(ctx, ev);
-      rc = 0;
+      rc = EXIT_SUCCESS;
     } else {
       fprintf(stderr, "grn_com_sopen failed (%s:%d): %s\n",
               bind_address, port, ctx->errbuf);




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