[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] use meaningful name for argument.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:37:19 JST 2012


Kouhei Sutou	2012-02-14 15:18:14 +0900 (Tue, 14 Feb 2012)

  New Revision: 9e9692b94c5bdb3d9b225888faaaf325c47e19d3
  https://github.com/mroonga/mroonga/commit/9e9692b94c5bdb3d9b225888faaaf325c47e19d3

  Log:
    use meaningful name for argument.

  Modified files:
    mrn_sys.c

  Modified: mrn_sys.c (+12 -12)
===================================================================
--- mrn_sys.c    2012-02-14 15:15:56 +0900 (fa81620)
+++ mrn_sys.c    2012-02-14 15:18:14 +0900 (c31b953)
@@ -89,17 +89,17 @@ int mrn_hash_remove(grn_ctx *ctx, grn_hash *hash, const char *key)
  * "/tmp/mysql-test/var/tmp/mysqld.1/#sql27c5_1_0" ==>
  *   "/tmp/mysql-test/var/tmp/mysqld.1/#sql27c5_1_0.mrn"
  */
-char *mrn_db_path_gen(const char *arg, char *dest)
+char *mrn_db_path_gen(const char *db_path_in_mysql, char *dest)
 {
-  if (strncmp(arg, "./", 2) == 0) {
+  if (strncmp(db_path_in_mysql, "./", 2) == 0) {
     int i = 2, j = 0, len;
-    len = strlen(arg);
-    while (arg[i] != '/' && i < len) {
-      dest[j++] = arg[i++];
+    len = strlen(db_path_in_mysql);
+    while (db_path_in_mysql[i] != '/' && i < len) {
+      dest[j++] = db_path_in_mysql[i++];
     }
     dest[j] = '\0';
   } else {
-    strcpy(dest, arg);
+    strcpy(dest, db_path_in_mysql);
   }
   strcat(dest, MRN_DB_FILE_SUFFIX);
   return dest;
@@ -111,17 +111,17 @@ char *mrn_db_path_gen(const char *arg, char *dest)
  * "/tmp/mysql-test/var/tmp/mysqld.1/#sql27c5_1_0" ==>
  *   "/tmp/mysql-test/var/tmp/mysqld.1/#sql27c5_1_0"
  */
-char *mrn_db_name_gen(const char *arg, char *dest)
+char *mrn_db_name_gen(const char *db_path_in_mysql, char *dest)
 {
-  if (strncmp(arg, "./", 2) == 0) {
+  if (strncmp(db_path_in_mysql, "./", 2) == 0) {
     int i = 2, j = 0, len;
-    len = strlen(arg);
-    while (arg[i] != '/' && i < len) {
-      dest[j++] = arg[i++];
+    len = strlen(db_path_in_mysql);
+    while (db_path_in_mysql[i] != '/' && i < len) {
+      dest[j++] = db_path_in_mysql[i++];
     }
     dest[j] = '\0';
   } else {
-    strcpy(dest, arg);
+    strcpy(dest, db_path_in_mysql);
   }
   return dest;
 }
-------------- next part --------------
HTML����������������������������...
Download 



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