for_each_loose_file_in_objdir: take an optional strbuf path
[gitweb.git] / git-compat-util.h
index 0c4e663928cb8fb03c73a6d3de6a506c7d98fc9a..44890d5b18f1f37308bdf77c80ee66bb65afc913 100644 (file)
@@ -192,7 +192,7 @@ extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);
 struct itimerval {
        struct timeval it_interval;
        struct timeval it_value;
-}
+};
 #endif
 
 #ifdef NO_SETITIMER
@@ -677,7 +677,7 @@ extern const unsigned char sane_ctype[256];
 #define iscntrl(x) (sane_istest(x,GIT_CNTRL))
 #define ispunct(x) sane_istest(x, GIT_PUNCT | GIT_REGEX_SPECIAL | \
                GIT_GLOB_SPECIAL | GIT_PATHSPEC_MAGIC)
-#define isxdigit(x) (hexval_table[x] != -1)
+#define isxdigit(x) (hexval_table[(unsigned char)(x)] != -1)
 #define tolower(x) sane_case((unsigned char)(x), 0x20)
 #define toupper(x) sane_case((unsigned char)(x), 0)
 #define is_pathspec_magic(x) sane_istest(x,GIT_PATHSPEC_MAGIC)