chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Always use errno > 0 to help gcc
[elogind.git]
/
src
/
shared
/
time-util.c
diff --git
a/src/shared/time-util.c
b/src/shared/time-util.c
index e192d5ef58d712302231575fce57808f7176ef5e..0c6deb66f4242367192a8da54a9894be7c4e4b0c 100644
(file)
--- a/
src/shared/time-util.c
+++ b/
src/shared/time-util.c
@@
-547,7
+547,7
@@
int parse_usec(const char *t, usec_t *usec) {
errno = 0;
l = strtoll(p, &e, 10);
- if (errno
!=
0)
+ if (errno
>
0)
return -errno;
if (l < 0)
@@
-627,7
+627,7
@@
int parse_nsec(const char *t, nsec_t *nsec) {
errno = 0;
l = strtoll(p, &e, 10);
- if (errno
!=
0)
+ if (errno
>
0)
return -errno;
if (l < 0)