[Groonga-commit] groonga/groonga at 0fd0d2b [master] mruby: use guard if style

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 8 23:42:21 JST 2013


Kouhei Sutou	2013-10-08 23:42:21 +0900 (Tue, 08 Oct 2013)

  New Revision: 0fd0d2b6147c370ced987fb10a4e4eba51dbfdb2
  https://github.com/groonga/groonga/commit/0fd0d2b6147c370ced987fb10a4e4eba51dbfdb2

  Message:
    mruby: use guard if style

  Modified files:
    lib/mrb.c

  Modified: lib/mrb.c (+4 -3)
===================================================================
--- lib/mrb.c    2013-10-08 23:40:38 +0900 (07c843b)
+++ lib/mrb.c    2013-10-08 23:42:21 +0900 (0933557)
@@ -89,11 +89,12 @@ grn_mrb_open_script(grn_ctx *ctx, const char *path)
         "script path is too long: %d (max: %d) <%s%s>",
         path_length, max_path_length,
         expanded_path, path);
-  } else {
-    strcat(expanded_path, path);
-    script_file = fopen(expanded_path, "r");
+    return NULL;
   }
 
+  strcat(expanded_path, path);
+  script_file = fopen(expanded_path, "r");
+
   return script_file;
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



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