sun_path is defined to be 108 bytes. No need for 4095. Quiets compiler warnings

This commit is contained in:
Isaac Connor 2020-04-24 18:03:00 -04:00
parent b0c5abc2c2
commit c6c8a23c02
2 changed files with 4 additions and 4 deletions

View File

@ -349,7 +349,7 @@ void StreamBase::openComms() {
} }
snprintf(rem_sock_path, sizeof(rem_sock_path), "%s/zms-%06dw.sock", staticConfig.PATH_SOCKS.c_str(), connkey); snprintf(rem_sock_path, sizeof(rem_sock_path), "%s/zms-%06dw.sock", staticConfig.PATH_SOCKS.c_str(), connkey);
strncpy(rem_addr.sun_path, rem_sock_path, sizeof(rem_addr.sun_path)-1); strncpy(rem_addr.sun_path, rem_sock_path, sizeof(rem_addr.sun_path));
rem_addr.sun_family = AF_UNIX; rem_addr.sun_family = AF_UNIX;
gettimeofday(&last_comm_update, NULL); gettimeofday(&last_comm_update, NULL);

View File

@ -78,11 +78,11 @@ protected:
bool send_objdetect; bool send_objdetect;
int connkey; int connkey;
int sd; int sd;
char loc_sock_path[PATH_MAX]; char loc_sock_path[108];
struct sockaddr_un loc_addr; struct sockaddr_un loc_addr;
char rem_sock_path[PATH_MAX]; char rem_sock_path[108];
struct sockaddr_un rem_addr; struct sockaddr_un rem_addr;
char sock_path_lock[PATH_MAX]; char sock_path_lock[108];
int lock_fd; int lock_fd;
bool paused; bool paused;
int step; int step;