From 07d8168a4524e453de626ec56b1dc8548e1f93bb Mon Sep 17 00:00:00 2001 From: Alex Cornejo Date: Thu, 26 Mar 2009 14:12:24 -0400 Subject: [PATCH] Removed unused display variable. I just realized this variable was unused in the original code, and in my patched version. I removed it. Signed-off-by: Alex Cornejo Signed-off-by: Julien Danjou --- awesome-client.c | 5 ++--- common/socket.c | 5 ++--- common/socket.h | 2 +- luaa.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/awesome-client.c b/awesome-client.c index be697be63..8f9518e9a 100644 --- a/awesome-client.c +++ b/awesome-client.c @@ -44,7 +44,6 @@ struct sockaddr_un *addr; int csfd; -char *display; /** Initialize the client and server socket connections. * If something goes wrong, preserves errno. @@ -56,7 +55,7 @@ sockets_init(void) if((csfd = socket_getclient()) < 0) return false; - if(!(addr = socket_open(csfd, display, SOCKET_MODE_CONNECT))) + if(!(addr = socket_open(csfd, SOCKET_MODE_CONNECT))) return false; return true; @@ -190,7 +189,7 @@ exit_help(int exit_code) int main(int argc, char **argv) { - char buf[1024], *msg, *prompt; + char buf[1024], *msg, *prompt, *display; int ret_value = EXIT_SUCCESS; ssize_t len, msg_len = 1; diff --git a/common/socket.c b/common/socket.c index 88f8efa53..80e1438a4 100644 --- a/common/socket.c +++ b/common/socket.c @@ -33,14 +33,13 @@ #define CONTROL_UNIX_SOCKET_PATH ".awesome_ctl." -/** Open a communication socket with awesome for a given display. +/** Open a communication socket with awesome. * \param csfd The socket file descriptor. - * \param display the display number * \param mode The open mode, either Bind or Connect. * \return sockaddr_un Struct ready to be used or NULL if a problem ocurred. */ struct sockaddr_un * -socket_open(int csfd, const char *display, const socket_mode_t mode) +socket_open(int csfd, const socket_mode_t mode) { char *host = NULL; int screenp = 0, displayp = 0; diff --git a/common/socket.h b/common/socket.h index 6bc724ba6..d46ed289e 100644 --- a/common/socket.h +++ b/common/socket.h @@ -28,7 +28,7 @@ typedef enum SOCKET_MODE_CONNECT } socket_mode_t; -struct sockaddr_un *socket_open(const int, const char *, const socket_mode_t); +struct sockaddr_un *socket_open(const int, const socket_mode_t); int socket_getclient(void); #endif diff --git a/luaa.c b/luaa.c index a2c8aabd3..9d615f49a 100644 --- a/luaa.c +++ b/luaa.c @@ -1115,7 +1115,7 @@ luaA_cs_init(void) if (csfd < 0 || fcntl(csfd, F_SETFD, FD_CLOEXEC) == -1) return; - if(!(addr = socket_open(csfd, getenv("DISPLAY"), SOCKET_MODE_BIND))) + if(!(addr = socket_open(csfd, SOCKET_MODE_BIND))) { warn("error binding UNIX domain socket: %s", strerror(errno)); return;