Skip to content

Commit

Permalink
fix getif_workaround_android.h
Browse files Browse the repository at this point in the history
char may be signed
  • Loading branch information
Lanius-collaris authored Jun 10, 2024
1 parent 227a7aa commit c08c26f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compat/getif_workaround_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ get_interface(){
if (if1->ifa_addr->sa_family != AF_INET)
continue;
if((if1->ifa_flags & IFF_MULTICAST) == IFF_MULTICAST){
char* sa_data = if1->ifa_addr->sa_data;
auto sa_data = reinterpret_cast<uint8_t*>(if1->ifa_addr->sa_data);
uint32_t value = sa_data[2] << 24
| sa_data[3] << 16
| sa_data[4] << 8
Expand All @@ -36,4 +36,4 @@ get_interface(){
}

} /* namespace workaround */
} /* namespace dht */
} /* namespace dht */

0 comments on commit c08c26f

Please sign in to comment.