diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-25 23:31:45 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-25 23:31:45 -0700 |
commit | 6169a89c4fd29cf9c747bab7bd310877328bc7e2 (patch) | |
tree | 299d1cd315b66e377261901698bc128752466fc8 /git-compat-util.h | |
parent | a7b02ccf9a682fa0c2b28df6ca20f9199cdca4de (diff) | |
parent | 8abe88a29c0789276c6d028b76b1190630b101c6 (diff) | |
download | git-6169a89c4fd29cf9c747bab7bd310877328bc7e2.tar.gz |
Merge branch 'maint'
* maint:
Start preparing for 1.5.1.3
Sanitize @to recipients.
git-svn: Ignore usernames in URLs in find_by_url
Document --dry-run and envelope-sender for git-send-email.
Allow users to optionally specify their envelope sender.
Ensure clean addresses are always used with Net::SMTP
Validate @recipients before using it for sendmail and Net::SMTP.
Perform correct quoting of recipient names.
Change the scope of the $cc variable as it is not needed outside of send_message.
Debugging cleanup improvements
Prefix Dry- to the message status to denote dry-runs.
Document --dry-run parameter to send-email.
git-svn: Don't rely on $_ after making a function call
Fix handle leak in write_tree
Actually handle some-low memory conditions
Conflicts:
RelNotes
git-send-email.perl
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 0b6d74d4d7..2c84016ac9 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -164,13 +164,13 @@ extern size_t gitstrlcpy(char *, const char *, size_t); extern uintmax_t gitstrtoumax(const char *, char **, int); #endif -extern void release_pack_memory(size_t); +extern void release_pack_memory(size_t, int); static inline char* xstrdup(const char *str) { char *ret = strdup(str); if (!ret) { - release_pack_memory(strlen(str) + 1); + release_pack_memory(strlen(str) + 1, -1); ret = strdup(str); if (!ret) die("Out of memory, strdup failed"); @@ -184,7 +184,7 @@ static inline void *xmalloc(size_t size) if (!ret && !size) ret = malloc(1); if (!ret) { - release_pack_memory(size); + release_pack_memory(size, -1); ret = malloc(size); if (!ret && !size) ret = malloc(1); @@ -203,7 +203,7 @@ static inline void *xrealloc(void *ptr, size_t size) if (!ret && !size) ret = realloc(ptr, 1); if (!ret) { - release_pack_memory(size); + release_pack_memory(size, -1); ret = realloc(ptr, size); if (!ret && !size) ret = realloc(ptr, 1); @@ -219,7 +219,7 @@ static inline void *xcalloc(size_t nmemb, size_t size) if (!ret && (!nmemb || !size)) ret = calloc(1, 1); if (!ret) { - release_pack_memory(nmemb * size); + release_pack_memory(nmemb * size, -1); ret = calloc(nmemb, size); if (!ret && (!nmemb || !size)) ret = calloc(1, 1); @@ -236,7 +236,7 @@ static inline void *xmmap(void *start, size_t length, if (ret == MAP_FAILED) { if (!length) return NULL; - release_pack_memory(length); + release_pack_memory(length, fd); ret = mmap(start, length, prot, flags, fd, offset); if (ret == MAP_FAILED) die("Out of memory? mmap failed: %s", strerror(errno)); |