Use S_IFMT mask to test for S_IFSOCK in src/kiss.c

This commit is contained in:
XANTRONIX 2020-07-23 01:43:25 -04:00 committed by XANTRONIX Industrial
parent f75a78eb4b
commit 4f3f8bd5e5

View file

@ -73,7 +73,7 @@ patty_kiss_tnc *patty_kiss_tnc_new(const char *device) {
goto error_stat; goto error_stat;
} }
if (st.st_mode & S_IFSOCK) { if ((st.st_mode & S_IFMT) == S_IFSOCK) {
struct sockaddr_un addr; struct sockaddr_un addr;
if (strlen(device) > sizeof(addr.sun_path)) { if (strlen(device) > sizeof(addr.sun_path)) {