Commit Diff


commit - 230a42bdc60c6136d2a5ce65bf1a2f26d990c096
commit + 656b1f76d3a6f52318782284fa83ae47894cbffb
blob - 6498094b62b98fd7a10f6879d38b0f0c06c80f99
blob + 41b8e41ec2b306ce46583d8a5b3561a27255c44c
--- got/got.c
+++ got/got.c
@@ -277,7 +277,7 @@ check_ancestry(struct got_worktree *worktree, struct g
 	err = got_commit_graph_iter_start(graph, head_commit_id, repo);
 	if (err)
 		goto done;
-	while (1) {
+	for (;;) {
 		struct got_object_id *id;
 
 		if (sigint_received || sigpipe_received)
@@ -759,7 +759,7 @@ print_commits(struct got_object_id *root_id, struct go
 	err = got_commit_graph_iter_start(graph, root_id, repo);
 	if (err)
 		goto done;
-	while (1) {
+	for (;;) {
 		struct got_commit_object *commit;
 		struct got_object_id *id;
 
blob - 3de5cb388b155a3d5a213e67aa219451b27e74b5
blob + 7774b2b34372b9bb7b0a2cf749c68e2bf015b105
--- lib/blame.c
+++ lib/blame.c
@@ -348,7 +348,7 @@ blame_open(struct got_blame **blamep, const char *path
 		goto done;
 
 	id = NULL;
-	while (1) {
+	for (;;) {
 		struct got_object_id *next_id;
 
 		err = got_commit_graph_iter_next(&next_id, graph);
blob - f42c329a6c1c86507f5d659aa66a06bf6cfa7d15
blob + a868d40089e2efdad8a04be237fe2b48a04e2849
--- lib/fileindex.c
+++ lib/fileindex.c
@@ -818,7 +818,7 @@ diff_fileindex_dir(struct got_fileindex *fileindex,
 
 	TAILQ_INIT(&dirlist);
 
-	while (1) {
+	for (;;) {
 		struct got_pathlist_entry *new = NULL;
 		struct dirent *dep = NULL;
 
blob - 713cdf2845f8ec504efd54c7c91eeffcfc84df0b
blob + 0a94c6561d897225828b8b9de80c968839fb55ae
--- lib/object_create.c
+++ lib/object_create.c
@@ -152,7 +152,7 @@ got_object_blob_create(struct got_object_id **id, cons
 		err = got_ferror(blobfile, GOT_ERR_IO);
 		goto done;
 	}
-	while (1) {
+	for (;;) {
 		char buf[8192];
 		ssize_t inlen;
 
blob - e152249c6afce606ed07fd63a05aa675fed43163
blob + 33ea7acf54a5d270b0227cb62feb35f838a4f8be
--- lib/object_parse.c
+++ lib/object_parse.c
@@ -903,7 +903,7 @@ got_read_file_to_mem(uint8_t **outbuf, size_t *outlen,
 
 	remain = blocksize;
 	total = 0;
-	while (1) {
+	for (;;) {
 		if (remain == 0) {
 			uint8_t *newbuf;
 			newbuf = reallocarray(buf, 1, total + blocksize);
blob - b138fdd109686a0d479044350498422491478c1b
blob + 1601edde20cb79ee3d12560e1c0a35b354af7d2c
--- lib/privsep.c
+++ lib/privsep.c
@@ -757,7 +757,7 @@ get_more:
 	if (err)
 		goto done;
 
-	while (1) {
+	for (;;) {
 		struct imsg imsg;
 		size_t n;
 		size_t datalen;
blob - 71cd05412075b820ffecc78e142ec85d5c895b2f
blob + d1b38a65bfd2d837c561df0239d29aab9207b914
--- lib/reference.c
+++ lib/reference.c
@@ -625,7 +625,7 @@ gather_on_disk_refs(struct got_reflist_head *refs, con
 	if (d == NULL)
 		goto done;
 
-	while (1) {
+	for (;;) {
 		struct dirent *dent;
 		struct got_reference *ref;
 		char *child;
@@ -723,7 +723,7 @@ got_ref_list(struct got_reflist_head *refs, struct got
 		char *line;
 		size_t len;
 		const char delim[3] = {'\0', '\0', '\0'};
-		while (1) {
+		for (;;) {
 			line = fparseln(f, &len, NULL, delim, 0);
 			if (line == NULL) {
 				if (feof(f))
@@ -933,7 +933,7 @@ delete_packed_ref(struct got_reference *delref, struct
 		err = got_error_prefix_errno2("fopen", packed_refs_path);
 		goto done;
 	}
-	while (1) {
+	for (;;) {
 		char *line;
 		size_t len;
 		const char delim[3] = {'\0', '\0', '\0'};
blob - 3aab97147502fae16a1bb23ec3bcf5de9577a7cc
blob + 1ed6f1e106debb9f768783a0c323bbd1f2052927
--- lib/worktree.c
+++ lib/worktree.c
@@ -1068,7 +1068,7 @@ get_file_status(unsigned char *status, struct stat *sb
 		goto done;
 	}
 	hdrlen = got_object_blob_get_hdrlen(blob);
-	while (1) {
+	for (;;) {
 		const uint8_t *bbuf = got_object_blob_get_read_buf(blob);
 		err = got_object_blob_read_block(&blen, blob);
 		if (err)
blob - d3ec83a5dfb13832659f54445a0d9650ca39b2bd
blob + f28286daed294ffb777009a1fddf3d4b82b5d856
--- libexec/got-read-blob/got-read-blob.c
+++ libexec/got-read-blob/got-read-blob.c
@@ -67,13 +67,13 @@ main(int argc, char *argv[])
 	}
 #endif
 
-	while (1) {
+	for (;;) {
 		struct imsg imsg, imsg_outfd;
 		FILE *f = NULL;
 		size_t size;
 		struct got_object *obj = NULL;
 		uint8_t *buf = NULL;
-	
+
 		memset(&imsg, 0, sizeof(imsg));
 		imsg.fd = -1;
 		memset(&imsg_outfd, 0, sizeof(imsg_outfd));
blob - 649c1dfdbd77e28adf852332292db3055f22e10a
blob + b015c3522f885fade88efdbd587bc655cb57984e
--- libexec/got-read-commit/got-read-commit.c
+++ libexec/got-read-commit/got-read-commit.c
@@ -101,7 +101,7 @@ main(int argc, char *argv[])
 	}
 #endif
 
-	while (1) {
+	for (;;) {
 		struct imsg imsg;
 		FILE *f = NULL;
 		struct got_commit_object *commit = NULL;
blob - ffe426e785a72453402b5b64c6d1306de3554d80
blob + f3b5792c26407f6760130ae763cbbfdb0ad0374a
--- libexec/got-read-object/got-read-object.c
+++ libexec/got-read-object/got-read-object.c
@@ -78,7 +78,7 @@ main(int argc, char *argv[])
 	}
 #endif
 
-	while (1) {
+	for (;;) {
 		if (sigint_received) {
 			err = got_error(GOT_ERR_CANCELLED);
 			break;
blob - 251c3ea0acb9ef58282facae7c7754b11cc8c83e
blob + 509295efffc3b0c4ab0b72c400398ae7d0b91bcc
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -507,7 +507,7 @@ main(int argc, char *argv[])
 		return 1;
 	}
 
-	while (1) {
+	for (;;) {
 		imsg.fd = -1;
 
 		if (sigint_received) {
blob - 4c84b09a452c2e366fe37c57a606d9f2a70d8f2b
blob + aff70b3e271c5d54f9f704c9c34232819a7caa28
--- libexec/got-read-tag/got-read-tag.c
+++ libexec/got-read-tag/got-read-tag.c
@@ -96,7 +96,7 @@ main(int argc, char *argv[])
 	}
 #endif
 
-	while (1) {
+	for (;;) {
 		struct imsg imsg;
 		FILE *f = NULL;
 		struct got_tag_object *tag = NULL;
blob - e7243456a6b1a3bbebf3eaaf8c7c8181ed373c77
blob + c3fc7aaef2ffafb2c1a8ba22f252b2d18482d347
--- libexec/got-read-tree/got-read-tree.c
+++ libexec/got-read-tree/got-read-tree.c
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
 	}
 #endif
 
-	while (1) {
+	for (;;) {
 		struct imsg imsg;
 		FILE *f = NULL;
 		struct got_tree_object *tree = NULL;