summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-10-13 15:56:23 +0200
committerGitHub <noreply@github.com>2016-10-13 15:56:23 +0200
commitd02b5af3f38d998d57cac3c4cc429b072a37e9cd (patch)
tree79750d9b61739fe81811195ec0d076a9c8a89eba
parentc5a6157b4a5776c862263f88a6ac33c1e4398f93 (diff)
parentaa7530d6817b0712c0795bbcdeffd4001ec19467 (diff)
Merge pull request #4363 from stefan-it/replace-while-loops
basic,coredump: use for loop instead of while
-rw-r--r--src/basic/gunicode.c2
-rw-r--r--src/coredump/coredump.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/gunicode.c b/src/basic/gunicode.c
index 542110503f..e6ac0545a4 100644
--- a/src/basic/gunicode.c
+++ b/src/basic/gunicode.c
@@ -26,7 +26,7 @@
char *
utf8_prev_char (const char *p)
{
- while (1)
+ for (;;)
{
p--;
if ((*p & 0xc0) != 0x80)
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index db60d0af7a..a982c204be 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -589,7 +589,7 @@ static int get_mount_namespace_leader(pid_t pid, pid_t *container_pid) {
if (r < 0)
return r;
- while (1) {
+ for (;;) {
ino_t parent_mntns;
r = get_process_ppid(cpid, &ppid);