summaryrefslogtreecommitdiff
path: root/server-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'server-info.c')
-rw-r--r--server-info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/server-info.c b/server-info.c
index 4d8199b1d9..7701d7c20a 100644
--- a/server-info.c
+++ b/server-info.c
@@ -27,6 +27,7 @@ static int uic_is_stale(const struct update_info_ctx *uic)
return uic->old_fp == NULL;
}
+__attribute__((format (printf, 2, 3)))
static int uic_printf(struct update_info_ctx *uic, const char *fmt, ...)
{
va_list ap;
@@ -93,7 +94,7 @@ static int update_info_file(char *path,
uic.old_fp = fopen_or_warn(path, "r");
/*
- * uic_printf will compare incremental comparison aginst old_fp
+ * uic_printf will compare incremental comparison against old_fp
* and mark uic as stale if needed
*/
ret = generate(&uic);
@@ -296,7 +297,7 @@ static void init_pack_info(const char *infofile, int force)
i = num_pack++;
ALLOC_GROW(info, num_pack, alloc);
- info[i] = xcalloc(1, sizeof(struct pack_info));
+ CALLOC_ARRAY(info[i], 1);
info[i]->p = p;
info[i]->old_num = -1;
}