Merge branch 'rs/calloc-array'
CALLOC_ARRAY() macro replaces many uses of xcalloc(). * rs/calloc-array: cocci: allow xcalloc(1, size) use CALLOC_ARRAY git-compat-util.h: drop trailing semicolon from macro definition
This commit is contained in:
@ -358,7 +358,7 @@ static void proc_receive_ref_append(const char *prefix)
|
||||
char *p;
|
||||
int len;
|
||||
|
||||
ref_pattern = xcalloc(1, sizeof(struct proc_receive_ref));
|
||||
CALLOC_ARRAY(ref_pattern, 1);
|
||||
p = strchr(prefix, ':');
|
||||
if (p) {
|
||||
while (prefix < p) {
|
||||
@ -1024,7 +1024,7 @@ static int read_proc_receive_report(struct packet_reader *reader,
|
||||
}
|
||||
if (new_report) {
|
||||
if (!hint->report) {
|
||||
hint->report = xcalloc(1, sizeof(struct ref_push_report));
|
||||
CALLOC_ARRAY(hint->report, 1);
|
||||
report = hint->report;
|
||||
} else {
|
||||
report = hint->report;
|
||||
|
Reference in New Issue
Block a user