#include "builtin.h"
+#include "config.h"
#include "delta.h"
#include "pack.h"
#include "csum-file.h"
static void free_base_data(struct base_data *c)
{
if (c->data) {
- free(c->data);
- c->data = NULL;
+ FREE_AND_NULL(c->data);
get_thread_data()->base_cache_used -= c->size;
}
}
git_inflate_end(&stream);
free(inbuf);
if (consume) {
- free(data);
- data = NULL;
+ FREE_AND_NULL(data);
}
return data;
}
if (startup_info->have_repository) {
read_lock();
- collision_test_needed = has_sha1_file_with_flags(oid->hash, HAS_SHA1_QUICK);
+ collision_test_needed =
+ has_sha1_file_with_flags(oid->hash, OBJECT_INFO_QUICK);
read_unlock();
}