mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(server): CID 509282: DEADCODE #30316
listen_addr cannot be NULL at this point.
This commit is contained in:
parent
f0334c2c71
commit
648d6426c8
@ -51,10 +51,6 @@ bool server_init(const char *listen_addr)
|
|||||||
must_free = true;
|
must_free = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!listen_addr) {
|
|
||||||
abort(); // Cannot happen.
|
|
||||||
}
|
|
||||||
|
|
||||||
int rv = server_start(listen_addr);
|
int rv = server_start(listen_addr);
|
||||||
|
|
||||||
// TODO(justinmk): this is for logging_spec. Can remove this after nvim_log #7062 is merged.
|
// TODO(justinmk): this is for logging_spec. Can remove this after nvim_log #7062 is merged.
|
||||||
@ -77,7 +73,7 @@ bool server_init(const char *listen_addr)
|
|||||||
kTrue ? "Failed to --listen: %s: \"%s\""
|
kTrue ? "Failed to --listen: %s: \"%s\""
|
||||||
: "Failed $NVIM_LISTEN_ADDRESS: %s: \"%s\"",
|
: "Failed $NVIM_LISTEN_ADDRESS: %s: \"%s\"",
|
||||||
rv < 0 ? os_strerror(rv) : (rv == 1 ? "empty address" : "?"),
|
rv < 0 ? os_strerror(rv) : (rv == 1 ? "empty address" : "?"),
|
||||||
listen_addr ? listen_addr : "(empty)");
|
listen_addr);
|
||||||
ok = false;
|
ok = false;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
@ -118,6 +114,7 @@ void server_teardown(void)
|
|||||||
/// - Windows: "\\.\pipe\<name>.<pid>.<counter>"
|
/// - Windows: "\\.\pipe\<name>.<pid>.<counter>"
|
||||||
/// - Other: "/tmp/nvim.user/xxx/<name>.<pid>.<counter>"
|
/// - Other: "/tmp/nvim.user/xxx/<name>.<pid>.<counter>"
|
||||||
char *server_address_new(const char *name)
|
char *server_address_new(const char *name)
|
||||||
|
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
static uint32_t count = 0;
|
static uint32_t count = 0;
|
||||||
char fmt[ADDRESS_MAX_SIZE];
|
char fmt[ADDRESS_MAX_SIZE];
|
||||||
|
Loading…
Reference in New Issue
Block a user