Fix some sparse warnings by using NULL instead of 0 and static-ifying a
variable not used outside its file.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
struct client *client;
/* accept the incoming connection */
- fd = accept(server->socket, NULL, 0);
+ fd = accept(server->socket, NULL, NULL);
if (fd < 0) {
pb_log("accept: %s\n", strerror(errno));
return 0;
struct ui_timer *timer = arg;
timer->handle_timeout(timer);
- timer->waiter = 0;
+ timer->waiter = NULL;
return 0;
}
return name;
}
-struct cui *cui;
+static struct cui *cui;
/*
* struct pb_cui - Main cui program instance.
#if !defined(HAVE_LIBTWIN_TWIN_X11_H)
assert(0);
#else
- scr->twin_ctx.x11 = twin_x11_create_ext(XOpenDisplay(0), width,
- height, 0);
+ scr->twin_ctx.x11 = twin_x11_create_ext(XOpenDisplay(NULL),
+ width, height, 0);
if (!scr->twin_ctx.x11) {
pb_log("%s: twin_x11_create_ext failed.\n", __func__);