[Groonga-commit] groonga/groonga at 7bf6f11 [master] Cast the argument of isspace from char to unsigned char

Back to archive index

Susumu Yata null+****@clear*****
Tue Jul 18 16:17:15 JST 2017


Susumu Yata	2017-07-18 16:17:15 +0900 (Tue, 18 Jul 2017)

  New Revision: 7bf6f11ffda14d5617e6ca20457056d5caa2f65e
  https://github.com/groonga/groonga/commit/7bf6f11ffda14d5617e6ca20457056d5caa2f65e

  Message:
    Cast the argument of isspace from char to unsigned char
    
    GitHub: #742

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+5 -5)
===================================================================
--- src/groonga.c    2017-07-18 16:12:28 +0900 (205201a)
+++ src/groonga.c    2017-07-18 16:17:15 +0900 (dcd0014)
@@ -2794,7 +2794,7 @@ config_file_parse(const char *path, const grn_str_getopt_opt *opts,
   char *ptr, *name, *value;
   size_t name_length, value_length;
 
-  while (isspace(*buf)) {
+  while (isspace((unsigned char)*buf)) {
     buf++;
   }
 
@@ -2805,17 +2805,17 @@ config_file_parse(const char *path, const grn_str_getopt_opt *opts,
 
   do {
     *ptr-- = '\0';
-  } while (ptr >= buf && isspace(*ptr));
+  } while (ptr >= buf && isspace((unsigned char)*ptr));
 
   if (!*buf) {
     return CONFIG_FILE_SUCCESS;
   }
 
   name = ptr = buf;
-  while (*ptr && !isspace(*ptr) && *ptr != '=') {
+  while (*ptr && !isspace((unsigned char)*ptr) && *ptr != '=') {
     ptr++;
   }
-  while (isspace(*ptr)) {
+  while (isspace((unsigned char)*ptr)) {
     *ptr++ = '\0';
   }
 
@@ -2830,7 +2830,7 @@ config_file_parse(const char *path, const grn_str_getopt_opt *opts,
 
   if (*ptr == '=') {
     *ptr++ = '\0';
-    while (isspace(*ptr)) {
+    while (isspace((unsigned char)*ptr)) {
       ptr++;
     }
     value = ptr;
-------------- next part --------------
HTML����������������������������...
Télécharger 



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