trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject [9/21] git commit: TS-1314: fix signed/unsigned warnings
Date Fri, 21 Sep 2012 10:04:40 GMT
TS-1314: fix signed/unsigned warnings


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/903991b0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/903991b0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/903991b0

Branch: refs/heads/3.2.x
Commit: 903991b058956e39be5e01666e35d8008cb54a8d
Parents: 8372e68
Author: James Peach <jpeach@apache.org>
Authored: Tue Jul 10 09:12:57 2012 -0700
Committer: Igor Galić <i.galic@brainsware.org>
Committed: Fri Sep 21 08:53:50 2012 +0200

----------------------------------------------------------------------
 proxy/Main.cc |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/903991b0/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 0284066..90337c9 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -737,7 +737,7 @@ static int
 cmd_index(char *p)
 {
   p += strspn(p, " \t");
-  for (int c = 0; c < SIZE(commands); c++) {
+  for (unsigned c = 0; c < SIZE(commands); c++) {
     const char *l = commands[c].n;
     while (l) {
       const char *s = strchr(l, '/');
@@ -755,16 +755,15 @@ cmd_index(char *p)
 static int
 cmd_help(char *cmd)
 {
-  int i;
-
   (void) cmd;
   printf("HELP\n\n");
   cmd = skip(cmd, true);
   if (!cmd) {
-    for (i = 0; i < SIZE(commands); i++) {
+    for (unsigned i = 0; i < SIZE(commands); i++) {
       printf("%15s  %s\n", commands[i].n, commands[i].d);
     }
   } else {
+    int i;
     if ((i = cmd_index(cmd)) < 0) {
       printf("\nno help found for: %s\n", cmd);
       return CMD_FAILED;


Mime
View raw message