]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
while (1) -> while (true)
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Jan 2012 12:30:51 +0000 (13:30 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Jan 2012 12:30:51 +0000 (13:30 +0100)
lockfile.c
stats.c
test/framework.c
util.c

index 039d5ac50ced7d46fdacf542750950588e476c8e..b6d98a732f869b865761590d9f070a71746309ce 100644 (file)
@@ -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 d023ae4c8f914b3935c66f5f1d3e54fc8b3043aa..2b573428e952a1616f0ddbce31bdbadce7022325 100644 (file)
--- 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;
index 53a8d60d212fac6a555235349901ae43186ae3b3..9abbb0585c5bee4d1c3f5b7e9719196852ca097b 100644 (file)
@@ -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 cea46fb72efec7b52e3964378f01b37085cfb05c..e1f09bc5ff86d7b4a9c9a33dbffd4dc353dbab44 100644 (file)
--- 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;