diff options
author | Russell Belfer <rb@github.com> | 2013-12-06 15:53:26 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-12-11 10:57:50 -0800 |
commit | f10d7a368fa4af28b1e6f082349ffa4f62b3c00e (patch) | |
tree | bcb842ae95a85002de6508b882ff9668b52166cd /src/notes.c | |
parent | c7b3e1b32040d05f3cb996d754a28af3b4d06d0b (diff) | |
download | libgit2-f10d7a368fa4af28b1e6f082349ffa4f62b3c00e.tar.gz |
Further callback error check style fixes
Okay, I've decided I like the readability of this style much
better so I used it everywhere.
Diffstat (limited to 'src/notes.c')
-rw-r--r-- | src/notes.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/notes.c b/src/notes.c index e3a3fccf8..e0d5ad19e 100644 --- a/src/notes.c +++ b/src/notes.c @@ -582,10 +582,12 @@ int git_note_foreach( if ((error = git_note_iterator_new(&iter, repo, notes_ref)) < 0) return error; - while (!(error = git_note_next(¬e_id, &annotated_id, iter)) && - !(error = GITERR_CALLBACK( - note_cb(¬e_id, &annotated_id, payload)))) - /* callback for each note */; + while (!(error = git_note_next(¬e_id, &annotated_id, iter))) { + if ((error = note_cb(¬e_id, &annotated_id, payload)) != 0) { + GITERR_CALLBACK(error); + break; + } + } if (error == GIT_ITEROVER) error = 0; |