1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

coverity 155648 low dead code daemonize disabled

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-12-06 11:00:36 +08:00
parent 9b780806f0
commit ef951221d6

View file

@ -75,7 +75,7 @@ LWS_VISIBLE struct lws_context *
lws_create_context(struct lws_context_creation_info *info)
{
struct lws_context *context = NULL;
#if LWS_POSIX
#ifndef LWS_NO_DAEMONIZE
int pid_daemon = get_daemonize_pid();
#endif
char *p;
@ -111,13 +111,12 @@ lws_create_context(struct lws_context_creation_info *info)
lwsl_err("No memory for websocket context\n");
return NULL;
}
#if LWS_POSIX
#ifndef LWS_NO_DAEMONIZE
if (pid_daemon) {
context->started_with_parent = pid_daemon;
lwsl_notice(" Started with daemon pid %d\n", pid_daemon);
}
#endif
context->listen_service_extraseen = 0;
context->protocols = info->protocols;
context->token_limits = info->token_limits;