summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-11-26 08:31:57 +0100
committerVicent Marti <tanoku@gmail.com>2011-11-26 08:48:01 +0100
commitb028a898a1adbfe7e2b63aef7314f3eea6bcfe49 (patch)
treeb1dc94b3458acf7cfe4a97c2df57e463efe24318 /src/util.h
parent03da4480f665bcaf9a621ce8b89fc43dbc1d7a47 (diff)
downloadlibgit2-b028a898a1adbfe7e2b63aef7314f3eea6bcfe49.tar.gz
util: Remove unused macro
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/util.h b/src/util.h
index 094155e59..4b1104b7b 100644
--- a/src/util.h
+++ b/src/util.h
@@ -104,25 +104,6 @@ extern void git__strtolower(char *str);
extern int git__fnmatch(const char *pattern, const char *name, int flags);
-/*
- * Realloc the buffer pointed at by variable 'x' so that it can hold
- * at least 'nr' entries; the number of entries currently allocated
- * is 'alloc', using the standard growing factor alloc_nr() macro.
- *
- * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
- */
-#define alloc_nr(x) (((x)+16)*3/2)
-#define ALLOC_GROW(x, nr, alloc) \
- do { \
- if ((nr) > alloc) { \
- if (alloc_nr(alloc) < (nr)) \
- alloc = (nr); \
- else \
- alloc = alloc_nr(alloc); \
- x = xrealloc((x), alloc * sizeof(*(x))); \
- } \
- } while (0)
-
extern void git__tsort(void **dst, size_t size, int (*cmp)(const void *, const void *));
extern void **git__bsearch(const void *key, void **base, size_t nmemb,
int (*compar)(const void *, const void *));