diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-03-17 12:00:33 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-03-17 12:00:33 -0400 |
commit | 74104582e27ef76790c9d954464b53b0e45a2b43 (patch) | |
tree | e223c8ea3ffddf14aa02a776a03ddb0f46fe910a | |
parent | a16a3c9f97072b1532c40637d53b1219addcbe00 (diff) | |
download | libsandglass-74104582e27ef76790c9d954464b53b0e45a2b43.tar.xz |
Minor formatting and style fixes.
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/sandglass-impl.h (renamed from src/sandglass_impl.h) | 0 | ||||
-rw-r--r-- | src/sandglass.c | 5 | ||||
-rw-r--r-- | src/timespec.c | 10 | ||||
-rw-r--r-- | src/tsc.c | 2 | ||||
-rw-r--r-- | tests/introspective-cputime.c | 2 | ||||
-rw-r--r-- | tests/introspective-system.c | 2 | ||||
-rw-r--r-- | tests/monotonic-cputime.c | 2 | ||||
-rw-r--r-- | tests/monotonic-realticks.c | 2 | ||||
-rw-r--r-- | tests/monotonic-system.c | 2 | ||||
-rw-r--r-- | tests/noprecache.c | 2 |
11 files changed, 16 insertions, 15 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index b228b83..12ebf1a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,7 @@ lib_LTLIBRARIES = libsandglass.la nobase_include_HEADERS = sandglass.h libsandglass_la_SOURCES = sandglass.h \ - sandglass_impl.h \ + sandglass-impl.h \ sandglass.c \ timespec.c diff --git a/src/sandglass_impl.h b/src/sandglass-impl.h index e10562f..e10562f 100644 --- a/src/sandglass_impl.h +++ b/src/sandglass-impl.h diff --git a/src/sandglass.c b/src/sandglass.c index 0710788..a056980 100644 --- a/src/sandglass.c +++ b/src/sandglass.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "sandglass_impl.h" +#include "sandglass-impl.h" #include "sandglass.h" #include <unistd.h> #include <time.h> @@ -164,7 +164,8 @@ sandglass_real_gettime(sandglass_t *sandglass) break; case SANDGLASS_SYSTEM: - if ((clock_ticks = clock()) == -1) + clock_ticks = clock(); + if (clock_ticks == -1) return -1; sandglass->grains = clock_ticks; break; diff --git a/src/timespec.c b/src/timespec.c index c077f8b..1353076 100644 --- a/src/timespec.c +++ b/src/timespec.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "sandglass_impl.h" +#include "sandglass-impl.h" #include "sandglass.h" #include <time.h> #include <unistd.h> @@ -75,18 +75,18 @@ sandglass_timespec_sub(struct timespec *ts, const struct timespec *d) int sandglass_timespec_cmp(const struct timespec *a, const struct timespec *b) { - if (a->tv_sec > b->tv_sec) + if (a->tv_sec > b->tv_sec) { return 1; - else if (a->tv_sec == b->tv_sec) { + } else if (a->tv_sec == b->tv_sec) { if (a->tv_nsec > b->tv_nsec) return 1; else if (a->tv_nsec == b->tv_nsec) return 0; else return -1; - } - else + } else { return -1; + } } /* Spins for the time interval specified by ts */ @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "sandglass_impl.h" +#include "sandglass-impl.h" #include "sandglass.h" #include <time.h> #include <unistd.h> diff --git a/tests/introspective-cputime.c b/tests/introspective-cputime.c index 7ebf041..dd76d67 100644 --- a/tests/introspective-cputime.c +++ b/tests/introspective-cputime.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "../src/sandglass_impl.h" +#include "../src/sandglass-impl.h" #include "../src/sandglass.h" #include <unistd.h> #include <time.h> diff --git a/tests/introspective-system.c b/tests/introspective-system.c index 8ed6441..3ebc007 100644 --- a/tests/introspective-system.c +++ b/tests/introspective-system.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "../src/sandglass_impl.h" +#include "../src/sandglass-impl.h" #include "../src/sandglass.h" #include <unistd.h> #include <time.h> diff --git a/tests/monotonic-cputime.c b/tests/monotonic-cputime.c index 3f59a3f..3e30dd8 100644 --- a/tests/monotonic-cputime.c +++ b/tests/monotonic-cputime.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "../src/sandglass_impl.h" +#include "../src/sandglass-impl.h" #include "../src/sandglass.h" #include <unistd.h> #include <time.h> diff --git a/tests/monotonic-realticks.c b/tests/monotonic-realticks.c index 1e48ca5..e6fbcee 100644 --- a/tests/monotonic-realticks.c +++ b/tests/monotonic-realticks.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "../src/sandglass_impl.h" +#include "../src/sandglass-impl.h" #include "../src/sandglass.h" #include <unistd.h> #include <time.h> diff --git a/tests/monotonic-system.c b/tests/monotonic-system.c index 1fb1c1c..6216fdb 100644 --- a/tests/monotonic-system.c +++ b/tests/monotonic-system.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "../src/sandglass_impl.h" +#include "../src/sandglass-impl.h" #include "../src/sandglass.h" #include <unistd.h> #include <time.h> diff --git a/tests/noprecache.c b/tests/noprecache.c index 937b0a1..9762250 100644 --- a/tests/noprecache.c +++ b/tests/noprecache.c @@ -18,7 +18,7 @@ * <http://www.gnu.org/licenses/>. * *************************************************************************/ -#include "../src/sandglass_impl.h" +#include "../src/sandglass-impl.h" #include "../src/sandglass.h" #include <unistd.h> #include <time.h> |