commit - 2620684109b956e9b51f33d9a5e862fbdbbe8de4
commit + 062ebb78e3657390fb91a2324b2d3a5d2ee07a5b
blob - 5b910150d744fa402d462bbd7cd1c1462155aa3f
blob + 73fbb64e2208b4479a4d74bf5b63fdaa5a3540f3
--- lib/object.c
+++ lib/object.c
{
static const size_t len = SHA1_DIGEST_STRING_LENGTH;
- *outbuf = calloc(1, len);
+ *outbuf = malloc(len);
if (*outbuf == NULL)
return got_error_from_errno();
size_t outlen, totlen;
int i;
- buf = calloc(zbsize, sizeof(char));
+ buf = malloc(zbsize);
if (buf == NULL)
return got_error_from_errno();
if (err)
goto done;
if (strchr(zb.outbuf, '\0') == NULL) {
- buf = recallocarray(buf, 1 + i, 2 + i, zbsize);
+ buf = reallocarray(buf, 2 + i, zbsize);
if (buf == NULL) {
err = got_error_from_errno();
goto done;
const struct got_error *err = NULL;
struct got_object_qid *qid;
- qid = calloc(1, sizeof(*qid));
+ qid = malloc(sizeof(*qid));
if (qid == NULL)
return got_error_from_errno();
- qid->id = calloc(1, sizeof(*qid->id));
+ qid->id = malloc(sizeof(*qid->id));
if (qid->id == NULL) {
err = got_error_from_errno();
free(qid);
*outbuf = NULL;
*outlen = 0;
- buf = calloc(1, blocksize);
+ buf = malloc(blocksize);
if (buf == NULL)
return got_error_from_errno();
if (*blob == NULL)
return got_error_from_errno();
- (*blob)->read_buf = calloc(1, blocksize);
+ (*blob)->read_buf = malloc(blocksize);
if ((*blob)->read_buf == NULL) {
err = got_error_from_errno();
goto done;