summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2012-01-08 13:30:51 +0100
committerJoel Rosdahl <joel@rosdahl.net>2012-01-08 13:30:51 +0100
commit90779f7dceea3e84e01c8908383a97ac1a7f8b45 (patch)
tree9f98b40ea7ff744deae939cfc6fd55d5a66aa7aa
parent01f0b62840259006f4bf1213568eaa6809ce29e2 (diff)
downloadccache-90779f7dceea3e84e01c8908383a97ac1a7f8b45.tar.gz
while (1) -> while (true)
-rw-r--r--lockfile.c4
-rw-r--r--stats.c4
-rw-r--r--test/framework.c4
-rw-r--r--util.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/lockfile.c b/lockfile.c
index 039d5ac5..b6d98a73 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 Joel Rosdahl
+ * Copyright (C) 2010-2012 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -43,7 +43,7 @@ lockfile_acquire(const char *path, unsigned staleness_limit)
#endif
unsigned to_sleep = 1000, slept = 0; /* Microseconds. */
- while (1) {
+ while (true) {
free(my_content);
my_content = format("%s:%d:%d", hostname, (int)getpid(), (int)time(NULL));
diff --git a/stats.c b/stats.c
index d023ae4c..2b573428 100644
--- a/stats.c
+++ b/stats.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2004 Andrew Tridgell
- * Copyright (C) 2009-2011 Joel Rosdahl
+ * Copyright (C) 2009-2012 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -105,7 +105,7 @@ parse_stats(struct counters *counters, const char *buf)
long val;
p = buf;
- while (1) {
+ while (true) {
val = strtol(p, &p2, 10);
if (p2 == p) {
break;
diff --git a/test/framework.c b/test/framework.c
index 53a8d60d..9abbb058 100644
--- a/test/framework.c
+++ b/test/framework.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Joel Rosdahl
+ * Copyright (C) 2010, 2012 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -68,7 +68,7 @@ cct_run(suite_fn *suites, int verbose_output)
for (suite = suites; *suite; suite++) {
unsigned test_index = 0;
- while (1) {
+ while (true) {
test_index = (*suite)(test_index + 1);
if (test_index == 0) {
/* We have reached the end of the suite. */
diff --git a/util.c b/util.c
index cea46fb7..e1f09bc5 100644
--- a/util.c
+++ b/util.c
@@ -900,7 +900,7 @@ gnu_getcwd(void)
{
unsigned size = 128;
- while (1) {
+ while (true) {
char *buffer = (char *)x_malloc(size);
if (getcwd(buffer, size) == buffer) {
return buffer;