summaryrefslogtreecommitdiff
path: root/examples/network
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-06-25 11:56:52 +0200
committerPatrick Steinhardt <ps@pks.im>2018-07-13 08:25:12 +0200
commit9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a (patch)
treef053f0a7f44be547e208d35447623617dfbd0340 /examples/network
parentf347a441c81c4e16dd54de07c5070eca8fccd5c8 (diff)
downloadlibgit2-9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a.tar.gz
treewide: remove use of C++ style comments
C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/clone.c10
-rw-r--r--examples/network/index-pack.c6
-rw-r--r--examples/network/ls-remote.c2
3 files changed, 10 insertions, 8 deletions
diff --git a/examples/network/clone.c b/examples/network/clone.c
index 540000bfd..ce4b6aedf 100644
--- a/examples/network/clone.c
+++ b/examples/network/clone.c
@@ -48,7 +48,7 @@ static void print_progress(const progress_data *pd)
static int sideband_progress(const char *str, int len, void *payload)
{
- (void)payload; // unused
+ (void)payload; /* unused */
printf("remote: %.*s", len, str);
fflush(stdout);
@@ -82,15 +82,15 @@ int do_clone(git_repository *repo, int argc, char **argv)
const char *path = argv[2];
int error;
- (void)repo; // unused
+ (void)repo; /* unused */
- // Validate args
+ /* Validate args */
if (argc < 3) {
printf ("USAGE: %s <url> <path>\n", argv[0]);
return -1;
}
- // Set up options
+ /* Set up options */
checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
checkout_opts.progress_cb = checkout_progress;
checkout_opts.progress_payload = &pd;
@@ -100,7 +100,7 @@ int do_clone(git_repository *repo, int argc, char **argv)
clone_opts.fetch_opts.callbacks.credentials = cred_acquire_cb;
clone_opts.fetch_opts.callbacks.payload = &pd;
- // Do the clone
+ /* Do the clone */
error = git_clone(&cloned_repo, url, path, &clone_opts);
printf("\n");
if (error != 0) {
diff --git a/examples/network/index-pack.c b/examples/network/index-pack.c
index 314f21160..e9261027c 100644
--- a/examples/network/index-pack.c
+++ b/examples/network/index-pack.c
@@ -19,8 +19,10 @@
#endif
#include "common.h"
-// This could be run in the main loop whilst the application waits for
-// the indexing to finish in a worker thread
+/*
+ * This could be run in the main loop whilst the application waits for
+ * the indexing to finish in a worker thread
+ */
static int index_cb(const git_transfer_progress *stats, void *data)
{
(void)data;
diff --git a/examples/network/ls-remote.c b/examples/network/ls-remote.c
index 9329da5d9..fb258acbe 100644
--- a/examples/network/ls-remote.c
+++ b/examples/network/ls-remote.c
@@ -12,7 +12,7 @@ static int use_remote(git_repository *repo, char *name)
size_t refs_len, i;
git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
- // Find the remote by name
+ /* Find the remote by name */
error = git_remote_lookup(&remote, repo, name);
if (error < 0) {
error = git_remote_create_anonymous(&remote, repo, name);