39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
|
|
From 42c1aefc303fdf891fbb099ea51f00dca83ab606 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Stephen Hemminger <stephen@networkplumber.org>
|
||
|
|
Date: Mon, 17 Jul 2017 17:23:56 -0700
|
||
|
|
Subject: brctl: fix signed/unsigned comparison warnings
|
||
|
|
|
||
|
|
If built with warning enabled, Gcc would complain about
|
||
|
|
comparison of signed with unsigned.
|
||
|
|
|
||
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||
|
|
---
|
||
|
|
brctl/brctl_cmd.c | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c
|
||
|
|
index 5f12e6f..acd66be 100644
|
||
|
|
--- a/brctl/brctl_cmd.c
|
||
|
|
+++ b/brctl/brctl_cmd.c
|
||
|
|
@@ -483,7 +483,7 @@ static const struct command commands[] = {
|
||
|
|
|
||
|
|
const struct command *command_lookup(const char *cmd)
|
||
|
|
{
|
||
|
|
- int i;
|
||
|
|
+ unsigned int i;
|
||
|
|
|
||
|
|
for (i = 0; i < sizeof(commands)/sizeof(commands[0]); i++) {
|
||
|
|
if (!strcmp(cmd, commands[i].name))
|
||
|
|
@@ -495,7 +495,7 @@ const struct command *command_lookup(const char *cmd)
|
||
|
|
|
||
|
|
void command_helpall(void)
|
||
|
|
{
|
||
|
|
- int i;
|
||
|
|
+ unsigned int i;
|
||
|
|
|
||
|
|
for (i = 0; i < sizeof(commands)/sizeof(commands[0]); i++) {
|
||
|
|
printf("\t%-10s\t%s\n", commands[i].name, commands[i].help);
|
||
|
|
--
|
||
|
|
cgit v1.1
|
||
|
|
|