util: rename parse_usec() to parse_sec() sinds the default unit is seconds
Internally we store all time values in usec_t, however parse_usec() actually was used mostly to parse values in seconds (unless explicit units were specified to define a different unit). Hence, be clear about this and name the function about what we pass into it, not what we get out of it.
This commit is contained in:
@@ -1171,7 +1171,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
|
||||
a++;
|
||||
}
|
||||
|
||||
if (parse_usec(a, &i->age) < 0) {
|
||||
if (parse_sec(a, &i->age) < 0) {
|
||||
log_error("[%s:%u] Invalid age '%s'.", fname, line, age);
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user