mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Apply code review feedback
This commit is contained in:
@@ -43,20 +43,17 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
git_config_backend *backend = NULL;
|
||||
int err = 0;
|
||||
|
||||
err = git_config_new(&cfg);
|
||||
if (err != 0) {
|
||||
if ((err = git_config_new(&cfg)) != 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = git_config_backend_from_string(&backend, (const char*)data, size);
|
||||
if (err != 0) {
|
||||
if ((err = git_config_backend_from_string(&backend, (const char*)data, size)) != 0) {
|
||||
goto out;
|
||||
}
|
||||
err = git_config_add_backend(cfg, backend, 0, NULL, 0);
|
||||
if (err != 0) {
|
||||
if ((err = git_config_add_backend(cfg, backend, 0, NULL, 0)) != 0) {
|
||||
goto out;
|
||||
}
|
||||
// Now owned by the config
|
||||
/* Now owned by the config */
|
||||
backend = NULL;
|
||||
|
||||
git_config_foreach(cfg, foreach_cb, NULL);
|
||||
|
||||
@@ -198,7 +198,7 @@ int git_config_backend_from_string(git_config_backend **out, const char *cfg, si
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (git_buf_put(&backend->cfg, cfg, len) < 0) {
|
||||
if (git_buf_set(&backend->cfg, cfg, len) < 0) {
|
||||
git_config_entries_free(backend->entries);
|
||||
git__free(backend);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user