From: Rainer Toebbicke Date: Tue, 12 May 2009 18:12:41 +0000 (+0000) Subject: STABLE14-rxdebug-print-values-unsigned-20090512 X-Git-Tag: openafs-stable-1_4_11pre1~50 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5c9b1ad03d2facea5894255810b29104ad4cb97c;p=packages%2Fo%2Fopenafs.git STABLE14-rxdebug-print-values-unsigned-20090512 LICENSE IPL10 FIXES 124563 for the values which are unsigned, use %u, not %d (cherry picked from commit b967654434f4d24b50dbc96e0296d2c632f76ea3) --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 94a939547..7a0d613aa 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -6153,49 +6153,49 @@ rx_PrintTheseStats(FILE * file, struct rx_statistics *s, int size, s->packetRequests); if (version >= RX_DEBUGI_VERSION_W_NEWPACKETTYPES) { - fprintf(file, "alloc-failures(rcv %d/%d,send %d/%d,ack %d)\n", + fprintf(file, "alloc-failures(rcv %u/%u,send %u/%u,ack %u)\n", s->receivePktAllocFailures, s->receiveCbufPktAllocFailures, s->sendPktAllocFailures, s->sendCbufPktAllocFailures, s->specialPktAllocFailures); } else { - fprintf(file, "alloc-failures(rcv %d,send %d,ack %d)\n", + fprintf(file, "alloc-failures(rcv %u,send %u,ack %u)\n", s->receivePktAllocFailures, s->sendPktAllocFailures, s->specialPktAllocFailures); } fprintf(file, - " greedy %d, " "bogusReads %d (last from host %x), " - "noPackets %d, " "noBuffers %d, " "selects %d, " - "sendSelects %d\n", s->socketGreedy, s->bogusPacketOnRead, + " greedy %u, " "bogusReads %u (last from host %x), " + "noPackets %u, " "noBuffers %u, " "selects %u, " + "sendSelects %u\n", s->socketGreedy, s->bogusPacketOnRead, s->bogusHost, s->noPacketOnRead, s->noPacketBuffersOnRead, s->selects, s->sendSelects); fprintf(file, " packets read: "); for (i = 0; i < RX_N_PACKET_TYPES; i++) { - fprintf(file, "%s %d ", rx_packetTypes[i], s->packetsRead[i]); + fprintf(file, "%s %u ", rx_packetTypes[i], s->packetsRead[i]); } fprintf(file, "\n"); fprintf(file, - " other read counters: data %d, " "ack %d, " "dup %d " - "spurious %d " "dally %d\n", s->dataPacketsRead, + " other read counters: data %u, " "ack %u, " "dup %u " + "spurious %u " "dally %u\n", s->dataPacketsRead, s->ackPacketsRead, s->dupPacketsRead, s->spuriousPacketsRead, s->ignorePacketDally); fprintf(file, " packets sent: "); for (i = 0; i < RX_N_PACKET_TYPES; i++) { - fprintf(file, "%s %d ", rx_packetTypes[i], s->packetsSent[i]); + fprintf(file, "%s %u ", rx_packetTypes[i], s->packetsSent[i]); } fprintf(file, "\n"); fprintf(file, - " other send counters: ack %d, " "data %d (not resends), " - "resends %d, " "pushed %d, " "acked&ignored %d\n", + " other send counters: ack %u, " "data %u (not resends), " + "resends %u, " "pushed %u, " "acked&ignored %u\n", s->ackPacketsSent, s->dataPacketsSent, s->dataPacketsReSent, s->dataPacketsPushed, s->ignoreAckedPacket); fprintf(file, - " \t(these should be small) sendFailed %d, " "fatalErrors %d\n", + " \t(these should be small) sendFailed %u, " "fatalErrors %u\n", s->netSendFailures, (int)s->fatalErrors); if (s->nRttSamples) {