commit - 88d59c36623f1c67164472d51164b934416b649f
commit + 4b60fecedffa10e9ad1531cab9b5827c17e9d059
blob - 639f8599deb7df9efd021f26555ac4f87a5273ce
blob + 1ec59fcb2d686c29ccf23365cf46cbfb8d164bf6
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
free(d_file);
return description;
err:
- if (asprintf(&description, "%s", "") == -1)
- return NULL;
-
- return description;
+ return strdup("");
}
static char *
if (strncmp(repo_ref, "refs/heads/", 11) == 0)
is_head = 1;
- if (gw_trans->gw_conf->got_show_repo_age == false) {
- if (asprintf(&repo_age, "") == -1)
- return NULL;
- return repo_age;
- }
+ if (gw_trans->gw_conf->got_show_repo_age == false)
+ return strdup("");
error = got_repo_open(&repo, dir, NULL);
if (error)
committer_time = cmp_time;
repo_age = gw_get_time_str(committer_time, ref_tm);
} else
- if (asprintf(&repo_age, "") == -1)
- return NULL;
+ return strdup("");
got_ref_list_free(&refs);
free(id);
return repo_age;
free(d_file);
return owner;
err:
- if (asprintf(&owner, "%s", "") == -1)
- return NULL;
-
- return owner;
+ return strdup("");
}
static char *