summaryrefslogtreecommitdiff
path: root/flowtop.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-07-29 11:48:41 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-07-29 11:48:41 +0200
commit7834874237b791abe04a1b22aff207cfa5293e34 (patch)
tree78ef1232fa5ee017220c3c1bb94954448a5ccf24 /flowtop.c
parente18e050dfb9a79241bc5169569ce28071353a8c1 (diff)
flowtop: Fix compiler warnings
Fix the following compiler warnings that occur when building with "-W -Wall -Wextra": flowtop.c: In function ‘walk_process’: flowtop.c:417:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] flowtop.c: In function ‘presenter_screen_update’: flowtop.c:937:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] flowtop.c:938:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'flowtop.c')
-rw-r--r--flowtop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/flowtop.c b/flowtop.c
index 884acd1..d0b9a80 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -414,7 +414,7 @@ static int walk_process(char *process, struct flow_entry *n)
if (stat(path, &statbuf) < 0)
continue;
- if (S_ISSOCK(statbuf.st_mode) && n->inode == statbuf.st_ino) {
+ if (S_ISSOCK(statbuf.st_mode) && (ino_t) n->inode == statbuf.st_ino) {
memset(n->cmdline, 0, sizeof(n->cmdline));
snprintf(path, sizeof(path), "/proc/%s/exe", process);
@@ -883,7 +883,8 @@ static inline int presenter_flow_wrong_state(struct flow_entry *n, int state)
static void presenter_screen_update(WINDOW *screen, struct flow_list *fl,
int skip_lines)
{
- int i, j, maxy;
+ int maxy;
+ size_t i, j;
unsigned int line = 3;
struct flow_entry *n;
uint8_t protocols[] = {