]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup set_config_time_offset_boot()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 15:17:34 +0000 (16:17 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 15:49:41 +0000 (16:49 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index c4178bae0ed006cf40be1d021ba4bb3ff7e49ef7..1435eec4e318bf20edf6be5a95357d45fffd597a 100644 (file)
@@ -2715,18 +2715,18 @@ static int set_config_time_offset_boot(const char *key, const char *value,
        unit = lxc_trim_whitespace_in_place(buf);
        if (strcmp(unit, "h") == 0) {
                if (!multiply_overflow(offset, 3600, &lxc_conf->timens.s_boot))
-                       return -EOVERFLOW;
+                       return ret_errno(EOVERFLOW);
        } else if (strcmp(unit, "m") == 0) {
                if (!multiply_overflow(offset, 60, &lxc_conf->timens.s_boot))
-                       return -EOVERFLOW;
+                       return ret_errno(EOVERFLOW);
        } else if (strcmp(unit, "s") == 0) {
                lxc_conf->timens.s_boot = offset;
        } else if (strcmp(unit, "ms") == 0) {
                if (!multiply_overflow(offset, 1000000, &lxc_conf->timens.ns_boot))
-                       return -EOVERFLOW;
+                       return ret_errno(EOVERFLOW);
        } else if (strcmp(unit, "us") == 0) {
                if (!multiply_overflow(offset, 1000, &lxc_conf->timens.ns_boot))
-                       return -EOVERFLOW;
+                       return ret_errno(EOVERFLOW);
        } else if (strcmp(unit, "ns") == 0) {
                lxc_conf->timens.ns_boot = offset;
        } else {