Update draft release notes to 2.2
[gitweb.git] / git-compat-util.h
index 08a9ee2970aaef6f40fbb3c73f9c38ad176cf601..fb41118c0705c628bed093c4a915a58aa01a5a1a 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
@@ -627,6 +627,8 @@ extern int odb_mkstemp(char *template, size_t limit, const char *pattern);
 extern int odb_pack_keep(char *name, size_t namesz, const unsigned char *sha1);
 extern char *xgetcwd(void);
 
+#define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x)))
+
 static inline size_t xsize_t(off_t len)
 {
        if (len > (size_t) len)