[Groonga-commit] groonga/groonga at 793e203 [master] Avoid variable shadowing

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 15 12:58:33 JST 2015


Kouhei Sutou	2015-01-15 12:58:33 +0900 (Thu, 15 Jan 2015)

  New Revision: 793e203f2df6f9c2de396d42e4e72ba290816987
  https://github.com/groonga/groonga/commit/793e203f2df6f9c2de396d42e4e72ba290816987

  Message:
    Avoid variable shadowing
    
    "message" is too generic.

  Modified files:
    lib/grn_ctx.h

  Modified: lib/grn_ctx.h (+6 -6)
===================================================================
--- lib/grn_ctx.h    2015-01-15 11:54:20 +0900 (da3058d)
+++ lib/grn_ctx.h    2015-01-15 12:58:33 +0900 (391f72b)
@@ -156,9 +156,9 @@ GRN_API void grn_ctx_impl_set_current_error_message(grn_ctx *ctx);
 #define SYSTEM_ERROR_MESSAGE_BUFFER_SIZE 1024
 #define SERR(str) do {\
   grn_rc rc;\
-  const char *message;\
+  const char *system_message;\
   int error = GetLastError();\
-  message = grn_current_error_message();\
+  system_message = grn_current_error_message();\
   switch (error) {\
   case ERROR_FILE_NOT_FOUND :\
   case ERROR_PATH_NOT_FOUND :\
@@ -245,7 +245,7 @@ GRN_API void grn_ctx_impl_set_current_error_message(grn_ctx *ctx);
     rc = GRN_UNKNOWN_ERROR;\
     break;\
   }\
-  ERR(rc, "syscall error '%s' (%s)[%d]", str, message, error);\
+  ERR(rc, "syscall error '%s' (%s)[%d]", str, system_message, error);\
 } while (0)
 
 #define SOERR(str) do {\
@@ -334,7 +334,7 @@ GRN_API void grn_ctx_impl_set_current_error_message(grn_ctx *ctx);
   grn_rc rc;\
   int errno_keep = errno;\
   grn_bool show_errno = GRN_FALSE;\
-  const char *message = grn_current_error_message();\
+  const char *system_message = grn_current_error_message();\
   switch (errno_keep) {\
   case ELOOP : rc = GRN_TOO_MANY_SYMBOLIC_LINKS; break;\
   case ENAMETOOLONG : rc = GRN_FILENAME_TOO_LONG; break;\
@@ -387,9 +387,9 @@ GRN_API void grn_ctx_impl_set_current_error_message(grn_ctx *ctx);
     break;\
   }\
   if (show_errno) {\
-    ERR(rc, "syscall error '%s' (%s)[%d]", str, message, errno_keep);\
+    ERR(rc, "syscall error '%s' (%s)[%d]", str, system_message, errno_keep); \
   } else {\
-    ERR(rc, "syscall error '%s' (%s)", str, message);\
+    ERR(rc, "syscall error '%s' (%s)", str, system_message);\
   }\
 } while (0)
 
-------------- next part --------------
HTML����������������������������...
Download 



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