X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fprint_wireless_info.c;h=efdd59b777907953403d1418fe49d1ebcd59bc9b;hb=4d3344ab9cd68bad5faf4ed3dad185dfcacb1e3d;hp=d229538d7586f7a86b810a05df3032b23b3bfbe5;hpb=53fb9b4f18cd9ee3a64be5084ccc76aeea279515;p=i3%2Fi3status diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c index d229538..efdd59b 100644 --- a/src/print_wireless_info.c +++ b/src/print_wireless_info.c @@ -16,6 +16,7 @@ #endif #ifdef __APPLE__ +#include #define IW_ESSID_MAX_SIZE 32 #endif @@ -489,7 +490,10 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface, char *ipv4_address = sstrdup(get_ip_addr(interface, AF_INET)); char *ipv6_address = sstrdup(get_ip_addr(interface, AF_INET6)); - // Removing '%' and following characters from IPv6 + /* + * Removing '%' and following characters from IPv6 since the interface identifier is redundant, + * as the output already includes the interface name. + */ if (ipv6_address != NULL) { char *prct_ptr = strstr(ipv6_address, "%"); if (prct_ptr != NULL) {