summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-07-13 16:02:30 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-07-13 16:13:47 +0200
commitbc1a4990f32c00d53a76aa0742358e094b564a8a (patch)
tree9d655a3cf718ad63684179144134ff4c7fac115d
parent86373411a23051a18ae3ed01b180f838dbcd76e7 (diff)
ifpps: Use unsigned int to store number of CPUs
Since get_number_cpus() now returns unsigned int store it's return value and derived values in unsigned int variables as well. This fixes the some warnings when compiling with -W/-Wsign-compare: Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--ifpps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ifpps.c b/ifpps.c
index 6742dd7..69e0f24 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -1036,7 +1036,8 @@ static void screen_update(WINDOW *screen, const char *ifname, const struct ifsta
int *first, uint64_t ms_interval, unsigned int top_cpus,
bool need_info)
{
- int cpus, top, voff = 1, cvoff = 2;
+ unsigned int cpus, top;
+ int voff = 1, cvoff = 2;
u32 rate = device_bitrate(ifname);
curs_set(0);
@@ -1291,8 +1292,8 @@ static int term_main(const char *ifname, uint64_t ms_interval,
int main(int argc, char **argv)
{
short ifflags = 0;
- int c, opt_index, ret, cpus, promisc = 0;
- unsigned int top_cpus = 5;
+ int c, opt_index, ret, promisc = 0;
+ unsigned int cpus, top_cpus = 5;
uint64_t interval = 1000;
char *ifname = NULL;
bool suppress_warnings = false;