summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-29 20:01:24 -0800
committerBen Straub <bs@github.com>2012-11-30 13:12:15 -0800
commit9267ff586f29deb99f41ab6eeb0599917ddd0cec (patch)
tree1626640207165137242ab55ca655e77caf98883f /examples
parent55f6f21b7dd5a177e2cc60c1054b438c05ed8f14 (diff)
downloadlibgit2-9267ff586f29deb99f41ab6eeb0599917ddd0cec.tar.gz
Deploy GIT_REMOTE_CALLBACKS_INIT
Diffstat (limited to 'examples')
-rw-r--r--examples/network/fetch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/network/fetch.c b/examples/network/fetch.c
index e341d2d6c..8048fd67a 100644
--- a/examples/network/fetch.c
+++ b/examples/network/fetch.c
@@ -70,7 +70,7 @@ int fetch(git_repository *repo, int argc, char **argv)
const git_transfer_progress *stats;
pthread_t worker;
struct dl_data data;
- git_remote_callbacks callbacks;
+ git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
argc = argc;
// Figure out whether it's a named remote or a URL
@@ -81,7 +81,6 @@ int fetch(git_repository *repo, int argc, char **argv)
}
// Set up the callbacks (only update_tips for now)
- memset(&callbacks, 0, sizeof(callbacks));
callbacks.update_tips = &update_cb;
callbacks.progress = &progress_cb;
git_remote_set_callbacks(remote, &callbacks);