Remove sscanf() warnings when parsing stats.
Change-Id: I15b7ba93d7ec121f9a7e19926f7436f2117b3b1a
This commit is contained in:
@@ -87,8 +87,8 @@ static int parseIfaceStats(const char* iface, struct Stats* stats) {
|
|||||||
|
|
||||||
while (fgets(buffer, sizeof(buffer), fp) != NULL) {
|
while (fgets(buffer, sizeof(buffer), fp) != NULL) {
|
||||||
int matched = sscanf(buffer, "%31s %llu %llu %llu %llu "
|
int matched = sscanf(buffer, "%31s %llu %llu %llu %llu "
|
||||||
"%*llu %llu %*llu %*llu %*llu %*llu "
|
"%*u %llu %*u %*u %*u %*u "
|
||||||
"%*llu %llu %*llu %*llu %*llu %*llu", cur_iface, &rxBytes,
|
"%*u %llu %*u %*u %*u %*u", cur_iface, &rxBytes,
|
||||||
&rxPackets, &txBytes, &txPackets, &tcpRxPackets, &tcpTxPackets);
|
&rxPackets, &txBytes, &txPackets, &tcpRxPackets, &tcpTxPackets);
|
||||||
if (matched >= 5) {
|
if (matched >= 5) {
|
||||||
if (matched == 7) {
|
if (matched == 7) {
|
||||||
|
|||||||
Reference in New Issue
Block a user