diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-03-09 19:55:50 +0100 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-03-09 20:09:22 +0100 |
commit | dda708e78f3c3f43d814d46c29ab9f2b9d47ed5c (patch) | |
tree | 60a6e01583c15209a42740a46e182ac7cbc893de /src/hashtable.c | |
parent | 6af24ce31f43c3621f11720704a078058665bc3f (diff) | |
download | libgit2-dda708e78f3c3f43d814d46c29ab9f2b9d47ed5c.tar.gz |
error-handling: On-disk config file backend
Includes:
- Proper error reporting when encountering syntax errors in a
config file (file, line number, column).
- Rewritten `config_write`, now with 99% less goto-spaghetti
- Error state in `git_filebuf`: filebuf write functions no longer
need to be checked for error returns. If any of the writes performed
on a buffer fail, the last call to `git_filebuf_commit` or
`git_filebuf_hash` will fail accordingly and set the appropiate error
message. Baller!
Diffstat (limited to 'src/hashtable.c')
-rw-r--r-- | src/hashtable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hashtable.c b/src/hashtable.c index 73a6336c4..c081fc9a7 100644 --- a/src/hashtable.c +++ b/src/hashtable.c @@ -227,11 +227,11 @@ int git_hashtable_remove2(git_hashtable *self, const void *key, void **old_value node->key = NULL; node->value = NULL; self->key_count--; - return GIT_SUCCESS; + return 0; } } - return git__throw(GIT_ENOTFOUND, "Entry not found in hash table"); + return GIT_ENOTFOUND; } int git_hashtable_merge(git_hashtable *self, git_hashtable *other) |