WIP sni dbus-menu support.

This commit is contained in:
topisani
2018-10-04 18:03:01 +02:00
parent 0eee8eade7
commit 108b1092e5
8 changed files with 112 additions and 75 deletions

View File

@ -142,7 +142,7 @@ int waybar::modules::Network::getExternalInterface()
int ifidx = -1;
/* Prepare request. */
uint32_t reqlen = NLMSG_SPACE(sizeof(*rt));
constexpr uint32_t reqlen = NLMSG_SPACE(sizeof(*rt));
char req[reqlen] = {0};
/* Build the RTM_GETROUTE request. */
@ -228,7 +228,7 @@ int waybar::modules::Network::getExternalInterface()
break;
}
for (uint32_t i = 0; i < dstlen; i += 1) {
c |= *(unsigned char *)(RTA_DATA(attr) + i);
c |= *((unsigned char *)RTA_DATA(attr) + i);
}
has_destination = (c == 0);
break;