diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-08-05 17:03:25 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-08-05 17:03:25 -0400 |
commit | 4b8733ffe9c0fe8e5a527186d323dab93e43fb37 (patch) | |
tree | 54e6e64995f65e619fdbd9a40b2b1e83244507b7 /src/libudev/time-util.c | |
parent | e35ef44ebe788aaffd1f6910750492bacaba7b6f (diff) |
src/{libudev,udev}: minor renamings from upstream
Diffstat (limited to 'src/libudev/time-util.c')
-rw-r--r-- | src/libudev/time-util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libudev/time-util.c b/src/libudev/time-util.c index d7682773c4..6f76e8c19b 100644 --- a/src/libudev/time-util.c +++ b/src/libudev/time-util.c @@ -38,10 +38,10 @@ usec_t timespec_load(const struct timespec *ts) { if (ts->tv_sec == (time_t) -1 && ts->tv_nsec == (long) -1) - return (usec_t) -1; + return USEC_INFINITY; if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC) - return (usec_t) -1; + return USEC_INFINITY; return (usec_t) ts->tv_sec * USEC_PER_SEC + @@ -71,7 +71,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) { assert(buf); assert(l > 0); - if (t == (usec_t) -1) + if (t == USEC_INFINITY) return NULL; if (t <= 0) { @@ -83,7 +83,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) { /* The result of this function can be parsed with parse_sec */ for (i = 0; i < ELEMENTSOF(table); i++) { - int k; + int k = 0; size_t n; bool done = false; usec_t a, b; |