diff --git a/compositor/main.c b/compositor/main.c index 0cb85647..1f75ae04 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -1684,7 +1684,7 @@ int main(int argc, char *argv[]) server_socket = getenv("WAYLAND_SERVER_SOCKET"); if (server_socket) { weston_log("Running with single client\n"); - fd = strtol(server_socket, &end, 0); + fd = strtol(server_socket, &end, 10); if (*end != '\0') fd = -1; } else { diff --git a/libweston/compositor.c b/libweston/compositor.c index 771f1c94..96eeb17a 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -4617,7 +4617,7 @@ weston_environment_get_fd(const char *env) e = getenv(env); if (!e) return -1; - fd = strtol(e, &end, 0); + fd = strtol(e, &end, 10); if (*end != '\0') return -1; diff --git a/shared/config-parser.c b/shared/config-parser.c index 247e8801..4c672206 100644 --- a/shared/config-parser.c +++ b/shared/config-parser.c @@ -170,7 +170,7 @@ weston_config_section_get_int(struct weston_config_section *section, } errno = 0; - *value = strtol(entry->value, &end, 0); + *value = strtol(entry->value, &end, 10); if (errno != 0 || end == entry->value || *end != '\0') { *value = default_value; errno = EINVAL; diff --git a/xwayland/launcher.c b/xwayland/launcher.c index 614ef5b3..b7aee3b4 100644 --- a/xwayland/launcher.c +++ b/xwayland/launcher.c @@ -164,7 +164,7 @@ create_lockfile(int display, char *lockfile, size_t lsize) return -1; } - other = strtol(pid, &end, 0); + other = strtol(pid, &end, 10); if (end != pid + 10) { weston_log("can't parse lock file %s\n", lockfile);