indentation fixes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373
diff --git a/got/got.c b/got/got.c
index 138291e..f7f14b9 100644
--- a/got/got.c
+++ b/got/got.c
@@ -191,8 +191,8 @@ main(int argc, char *argv[])
int ch;
int hflag = 0, Vflag = 0;
static struct option longopts[] = {
- { "version", no_argument, NULL, 'V' },
- { NULL, 0, NULL, 0 }
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
};
setlocale(LC_CTYPE, "");
@@ -561,7 +561,7 @@ collect_import_msg(char **logmsg, char **logmsg_path, const char *editor,
}
err = edit_logmsg(logmsg, editor, *logmsg_path, initial_content,
- initial_content_len);
+ initial_content_len);
done:
if (fd != -1 && close(fd) == -1 && err == NULL)
err = got_error_from_errno2("close", *logmsg_path);
@@ -957,13 +957,13 @@ fetch_progress(void *arg, const char *message, off_t packfile_size,
if (a->create_configs && !a->configs_created &&
!TAILQ_EMPTY(a->config_info.symrefs)) {
err = create_config_files(a->config_info.proto,
- a->config_info.host, a->config_info.port,
- a->config_info.remote_repo_path,
- a->config_info.git_url,
- a->config_info.fetch_all_branches,
- a->config_info.mirror_references,
- a->config_info.symrefs,
- a->config_info.wanted_branches, a->repo);
+ a->config_info.host, a->config_info.port,
+ a->config_info.remote_repo_path,
+ a->config_info.git_url,
+ a->config_info.fetch_all_branches,
+ a->config_info.mirror_references,
+ a->config_info.symrefs,
+ a->config_info.wanted_branches, a->repo);
if (err)
return err;
a->configs_created = 1;
@@ -1296,7 +1296,7 @@ create_config_files(const char *proto, const char *host, const char *port,
* If we asked for a set of wanted branches then use the first
* one of those.
*/
- if (!TAILQ_EMPTY(wanted_branches)) {
+ if (!TAILQ_EMPTY(wanted_branches)) {
pe = TAILQ_FIRST(wanted_branches);
default_branch = pe->path;
} else {
@@ -1637,7 +1637,7 @@ cmd_clone(int argc, char *argv[])
* a set of wanted branches use the first of one of those
* which could be fetched instead.
*/
- TAILQ_FOREACH(pe, &wanted_branches, entry) {
+ TAILQ_FOREACH(pe, &wanted_branches, entry) {
const char *target = pe->path;
struct got_reference *target_ref;
@@ -5486,8 +5486,8 @@ add_branch(struct got_repository *repo, const char *branch_name,
return got_error_path(branch_name, GOT_ERR_REF_NAME_MINUS);
if (asprintf(&refname, "refs/heads/%s", branch_name) == -1) {
- err = got_error_from_errno("asprintf");
- goto done;
+ err = got_error_from_errno("asprintf");
+ goto done;
}
err = got_ref_open(&ref, repo, refname, 0);
@@ -5974,13 +5974,13 @@ add_tag(struct got_repository *repo, struct got_worktree *worktree,
if (strncmp("refs/tags/", tag_name, 10) == 0) {
refname = strdup(tag_name);
if (refname == NULL) {
- err = got_error_from_errno("strdup");
- goto done;
+ err = got_error_from_errno("strdup");
+ goto done;
}
tag_name += 10;
} else if (asprintf(&refname, "refs/tags/%s", tag_name) == -1) {
- err = got_error_from_errno("asprintf");
- goto done;
+ err = got_error_from_errno("asprintf");
+ goto done;
}
err = got_ref_open(&ref, repo, refname, 0);
@@ -6288,7 +6288,7 @@ cmd_add(int argc, char *argv[])
TAILQ_FOREACH(pe, &paths, entry) {
if (asprintf(&ondisk_path, "%s/%s",
got_worktree_get_root_path(worktree),
- pe->path) == -1) {
+ pe->path) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
@@ -6436,7 +6436,7 @@ cmd_remove(int argc, char *argv[])
TAILQ_FOREACH(pe, &paths, entry) {
if (asprintf(&ondisk_path, "%s/%s",
got_worktree_get_root_path(worktree),
- pe->path) == -1) {
+ pe->path) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
@@ -6693,7 +6693,7 @@ cmd_revert(int argc, char *argv[])
TAILQ_FOREACH(pe, &paths, entry) {
if (asprintf(&ondisk_path, "%s/%s",
got_worktree_get_root_path(worktree),
- pe->path) == -1) {
+ pe->path) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
@@ -8868,7 +8868,7 @@ cmd_histedit(int argc, char *argv[])
if (hle->cmd->code == GOT_HISTEDIT_DROP ||
hle->cmd->code == GOT_HISTEDIT_FOLD) {
error = histedit_skip_commit(hle, worktree,
- repo);
+ repo);
if (error)
goto done;
} else {
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 6ea20ef..9dedeb9 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -1497,7 +1497,7 @@ gw_summary(struct gw_trans *gw_trans)
if (kerr != KCGI_OK)
goto done;
kerr = khtml_puts(gw_trans->gw_html_req,
- gw_trans->gw_dir->owner);
+ gw_trans->gw_dir->owner);
if (kerr != KCGI_OK)
goto done;
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
@@ -2199,7 +2199,7 @@ gw_template(size_t key, void *arg)
"/apple-touch-icon.png") == -1)
goto err;
if (asprintf(&fic32, "%s%s", gw_trans->gw_conf->got_www_path,
- "/favicon-32x32.png") == -1)
+ "/favicon-32x32.png") == -1)
goto err;
if (asprintf(&fic16, "%s%s", gw_trans->gw_conf->got_www_path,
"/favicon-16x16.png") == -1)
@@ -4588,7 +4588,7 @@ gw_output_site_link(struct gw_trans *gw_trans)
if (kerr != KCGI_OK)
goto done;
kerr = khtml_puts(gw_trans->gw_html_req,
- gw_trans->gw_conf->got_site_link);
+ gw_trans->gw_conf->got_site_link);
if (kerr != KCGI_OK)
goto done;
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
diff --git a/lib/blame.c b/lib/blame.c
index 4213eec..f8f1b5e 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -223,7 +223,7 @@ blame_open(struct got_blame **blamep, const char *path,
goto done;
}
err = got_object_blob_dump_to_file(&blame->filesize, &blame->nlines,
- &blame->line_offsets, blame->f, blob);
+ &blame->line_offsets, blame->f, blob);
if (err || blame->nlines == 0)
goto done;
diff --git a/lib/inflate.c b/lib/inflate.c
index b6bb904..1197bbb 100644
--- a/lib/inflate.c
+++ b/lib/inflate.c
@@ -296,7 +296,7 @@ got_inflate_to_mem(uint8_t **outbuf, size_t *outlen,
continue;
zb.outlen = (nbuf * GOT_INFLATE_BUFSIZE) - *outlen;
newbuf = reallocarray(*outbuf, ++nbuf,
- GOT_INFLATE_BUFSIZE);
+ GOT_INFLATE_BUFSIZE);
if (newbuf == NULL) {
err = got_error_from_errno("reallocarray");
free(*outbuf);
diff --git a/lib/privsep.c b/lib/privsep.c
index 0cacbdd..d15fdd1 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -500,7 +500,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int fd,
len);
if (wbuf == NULL)
return got_error_from_errno(
- "imsg_create FETCH_WANTED_BRANCH");
+ "imsg_create FETCH_WANTED_BRANCH");
/* Keep in sync with struct got_imsg_fetch_wanted_branch! */
if (imsg_add(wbuf, &name_len, sizeof(name_len)) == -1) {
@@ -511,7 +511,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int fd,
}
if (imsg_add(wbuf, name, name_len) == -1) {
err = got_error_from_errno(
- "imsg_add FETCH_WANTED_BRANCH");
+ "imsg_add FETCH_WANTED_BRANCH");
ibuf_free(wbuf);
return err;
}
@@ -532,7 +532,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int fd,
len);
if (wbuf == NULL)
return got_error_from_errno(
- "imsg_create FETCH_WANTED_REF");
+ "imsg_create FETCH_WANTED_REF");
/* Keep in sync with struct got_imsg_fetch_wanted_ref! */
if (imsg_add(wbuf, &name_len, sizeof(name_len)) == -1) {
@@ -543,7 +543,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int fd,
}
if (imsg_add(wbuf, name, name_len) == -1) {
err = got_error_from_errno(
- "imsg_add FETCH_WANTED_REF");
+ "imsg_add FETCH_WANTED_REF");
ibuf_free(wbuf);
return err;
}
@@ -1311,7 +1311,7 @@ got_privsep_send_blob(struct imsgbuf *ibuf, size_t size, size_t hdrlen,
memcpy(buf, &iblob, sizeof(iblob));
memcpy(buf + sizeof(iblob), data, size);
if (imsg_compose(ibuf, GOT_IMSG_BLOB, 0, 0, -1, buf,
- sizeof(iblob) + size) == -1) {
+ sizeof(iblob) + size) == -1) {
free(buf);
return got_error_from_errno("imsg_compose BLOB");
}
diff --git a/lib/worktree.c b/lib/worktree.c
index 330247e..54a1c38 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -2445,9 +2445,9 @@ sync_fileindex(struct got_fileindex *fileindex, const char *fileindex_path)
* this program exits have a different time stamp from the one which
* was recorded in the file index.
*/
- timeout.tv_sec = 0;
- timeout.tv_nsec = 1;
- nanosleep(&timeout, NULL);
+ timeout.tv_sec = 0;
+ timeout.tv_nsec = 1;
+ nanosleep(&timeout, NULL);
done:
if (new_index)
fclose(new_index);
@@ -2582,7 +2582,7 @@ checkout_files(struct got_worktree *worktree, struct got_fileindex *fileindex,
}
err = got_object_open_as_commit(&commit, repo,
- worktree->base_commit_id);
+ worktree->base_commit_id);
if (err)
goto done;
@@ -4986,7 +4986,7 @@ match_modified_subtree(int *modified, struct got_tree_entry *te,
struct got_commitable *ct = pe->data;
*modified = got_path_is_child(ct->in_repo_path, te_path,
strlen(te_path));
- if (*modified)
+ if (*modified)
break;
}
@@ -5023,8 +5023,8 @@ match_deleted_or_modified_ct(struct got_commitable **ctp,
if (got_object_id_cmp(ct->base_blob_id, &te->id) != 0)
continue;
- err = match_ct_parent_path(&path_matches, ct, base_tree_path);
- if (err)
+ err = match_ct_parent_path(&path_matches, ct, base_tree_path);
+ if (err)
return err;
if (!path_matches)
continue;
@@ -5116,8 +5116,8 @@ write_tree(struct got_object_id **new_tree_id, int *nentries,
(ct->flags & GOT_COMMITABLE_ADDED))
continue;
- if (!got_path_is_child(ct->in_repo_path, path_base_tree,
- strlen(path_base_tree)))
+ if (!got_path_is_child(ct->in_repo_path, path_base_tree,
+ strlen(path_base_tree)))
continue;
err = got_path_skip_common_ancestor(&child_path, path_base_tree,
diff --git a/libexec/got-fetch-pack/got-fetch-pack.c b/libexec/got-fetch-pack/got-fetch-pack.c
index 1a5b3d0..90f2ff6 100644
--- a/libexec/got-fetch-pack/got-fetch-pack.c
+++ b/libexec/got-fetch-pack/got-fetch-pack.c
@@ -82,8 +82,8 @@ flushpkt(int fd)
if (chattygot > 1)
fprintf(stderr, "%s: writepkt: 0000\n", getprogname());
- w = write(fd, "0000", 4);
- if (w == -1)
+ w = write(fd, "0000", 4);
+ if (w == -1)
return got_error_from_errno("write");
if (w != 4)
return got_error(GOT_ERR_IO);
@@ -844,7 +844,7 @@ fetch_pack(int fd, int packfd, uint8_t *pack_sha1,
continue;
got_sha1_digest_to_str(want[i].sha1, hashstr, sizeof(hashstr));
n = snprintf(buf, sizeof(buf), "want %s%s\n", hashstr,
- sent_my_capabilites ? "" : my_capabilities);
+ sent_my_capabilites ? "" : my_capabilities);
if (n >= sizeof(buf)) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
diff --git a/libexec/got-read-pack/got-read-pack.c b/libexec/got-read-pack/got-read-pack.c
index 687ed2e..27d10ab 100644
--- a/libexec/got-read-pack/got-read-pack.c
+++ b/libexec/got-read-pack/got-read-pack.c
@@ -234,7 +234,7 @@ tree_request(struct imsg *imsg, struct imsgbuf *ibuf, struct got_pack *pack,
memcpy(id.sha1, iobj.id, SHA1_DIGEST_LENGTH);
err = open_tree(&buf, &entries, &nentries, pack, packidx, iobj.idx,
- &id, objcache);
+ &id, objcache);
if (err)
return err;
@@ -990,15 +990,15 @@ main(int argc, char *argv[])
break;
case GOT_IMSG_TREE_REQUEST:
err = tree_request(&imsg, &ibuf, pack, packidx,
- &objcache);
+ &objcache);
break;
case GOT_IMSG_BLOB_REQUEST:
err = blob_request(&imsg, &ibuf, pack, packidx,
- &objcache);
+ &objcache);
break;
case GOT_IMSG_TAG_REQUEST:
err = tag_request(&imsg, &ibuf, pack, packidx,
- &objcache);
+ &objcache);
break;
case GOT_IMSG_COMMIT_TRAVERSAL_REQUEST:
err = commit_traversal_request(&imsg, &ibuf, pack,
diff --git a/tog/tog.c b/tog/tog.c
index a0db9b1..1b0d1ec 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2249,8 +2249,8 @@ open_log_view(struct tog_view *view, struct got_object_id *start_id,
!s->log_branches);
if (err)
goto done;
- err = got_commit_graph_iter_start(thread_graph,
- s->start_id, s->repo, NULL, NULL);
+ err = got_commit_graph_iter_start(thread_graph, s->start_id,
+ s->repo, NULL, NULL);
if (err)
goto done;
@@ -5636,8 +5636,8 @@ main(int argc, char *argv[])
int ch, hflag = 0, Vflag = 0;
char **cmd_argv = NULL;
static struct option longopts[] = {
- { "version", no_argument, NULL, 'V' },
- { NULL, 0, NULL, 0}
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0}
};
setlocale(LC_CTYPE, "");