Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9de56d22 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Remove sscanf() warnings when parsing stats.

Change-Id: I15b7ba93d7ec121f9a7e19926f7436f2117b3b1a
parent 9a2c2a6d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -87,8 +87,8 @@ static int parseIfaceStats(const char* iface, struct Stats* stats) {

    while (fgets(buffer, sizeof(buffer), fp) != NULL) {
        int matched = sscanf(buffer, "%31s %llu %llu %llu %llu "
                "%*llu %llu %*llu %*llu %*llu %*llu "
                "%*llu %llu %*llu %*llu %*llu %*llu", cur_iface, &rxBytes,
                "%*u %llu %*u %*u %*u %*u "
                "%*u %llu %*u %*u %*u %*u", cur_iface, &rxBytes,
                &rxPackets, &txBytes, &txPackets, &tcpRxPackets, &tcpTxPackets);
        if (matched >= 5) {
            if (matched == 7) {