diff --git a/daemon/daemon.c b/daemon/daemon.c index 4b685b2af..a33990433 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -195,18 +195,15 @@ trylocksock( const char * sockpath ) if( NULL == sockpath ) { confpath( path, sizeof path, CONF_FILE_SOCKET, 0 ); - fd = getsock( path ); - } - else - { - fd = getsock( sockpath ); + sockpath = path; } + fd = getsock( sockpath ); if( 0 > fd ) { return -1; } gl_sockfd = fd; - strlcpy( gl_sockpath, path, sizeof gl_sockpath ); + strlcpy( gl_sockpath, sockpath, sizeof gl_sockpath ); return fd; }