Get rid of -Wshadow warning - I guess we're including something that
authorGuy Harris <guy@alum.mit.edu>
Wed, 14 Aug 2013 01:18:58 +0000 (01:18 -0000)
committerGuy Harris <guy@alum.mit.edu>
Wed, 14 Aug 2013 01:18:58 +0000 (01:18 -0000)
gets <getopt.h>, so we get the optarg global.

svn path=/trunk/; revision=51350

39 files changed:
ui/cli/tap-afpstat.c
ui/cli/tap-ansi_astat.c
ui/cli/tap-bootpstat.c
ui/cli/tap-camelcounter.c
ui/cli/tap-camelsrt.c
ui/cli/tap-comparestat.c
ui/cli/tap-dcerpcstat.c
ui/cli/tap-diameter-avp.c
ui/cli/tap-expert.c
ui/cli/tap-follow.c
ui/cli/tap-funnel.c
ui/cli/tap-gsm_astat.c
ui/cli/tap-h225counter.c
ui/cli/tap-h225rassrt.c
ui/cli/tap-hosts.c
ui/cli/tap-httpstat.c
ui/cli/tap-icmpstat.c
ui/cli/tap-icmpv6stat.c
ui/cli/tap-iostat.c
ui/cli/tap-iousers.c
ui/cli/tap-macltestat.c
ui/cli/tap-megacostat.c
ui/cli/tap-mgcpstat.c
ui/cli/tap-protocolinfo.c
ui/cli/tap-protohierstat.c
ui/cli/tap-radiusstat.c
ui/cli/tap-rlcltestat.c
ui/cli/tap-rpcprogs.c
ui/cli/tap-rpcstat.c
ui/cli/tap-rtp.c
ui/cli/tap-rtspstat.c
ui/cli/tap-scsistat.c
ui/cli/tap-sctpchunkstat.c
ui/cli/tap-sipstat.c
ui/cli/tap-smbsids.c
ui/cli/tap-smbstat.c
ui/cli/tap-stats_tree.c
ui/cli/tap-sv.c
ui/cli/tap-wspstat.c

index 43db7d616f7fbb2a0d9a97829be6ec459d83792f..a35cc8574fdb12946a33c1981d106a2559367741 100644 (file)
@@ -106,15 +106,15 @@ afpstat_draw(void *pss)
 
 
 static void
-afpstat_init(const char *optarg, void* userdata _U_)
+afpstat_init(const char *opt_arg, void* userdata _U_)
 {
        afpstat_t *ss;
        guint32 i;
        const char *filter=NULL;
        GString *error_string;
 
-       if(!strncmp(optarg,"afp,srt,",8)){
-               filter=optarg+8;
+       if(!strncmp(opt_arg,"afp,srt,",8)){
+               filter=opt_arg+8;
        } else {
                filter=NULL;
        }
index 5ec46d6e8db822d1b63c85bf5af7c3dbfe46f835..90518541f234dcffdc9d074da73605740ac0b090 100644 (file)
@@ -128,7 +128,7 @@ ansi_a_stat_draw(
 
 
 static void
-ansi_a_stat_init(const char *optarg _U_, void* userdata _U_)
+ansi_a_stat_init(const char *opt_arg _U_, void* userdata _U_)
 {
     ansi_a_stat_t      *stat_p;
     GString            *err_p;
index 2bdb2f3cd58ee77a72df18a642c60656e15482f6..736381a5827655b072776417f448a3434a495379 100644 (file)
@@ -134,14 +134,14 @@ dhcpstat_draw(void *psp)
 /* When called, this function will create a new instance of tap-boopstat.
  */
 static void
-dhcpstat_init(const char *optarg, void* userdata _U_)
+dhcpstat_init(const char *opt_arg, void* userdata _U_)
 {
        dhcpstat_t *sp;
        const char      *filter=NULL;
        GString         *error_string;
 
-       if (!strncmp (optarg, "bootp,stat,", 11)){
-               filter=optarg+11;
+       if (!strncmp (opt_arg, "bootp,stat,", 11)){
+               filter=opt_arg+11;
        } else {
                filter=NULL;
        }
index 2d82d311cbfa0a66f7f04275615d9e043c477c40..e16c2e1ced753766575651d2366c3ff5d5afe560 100644 (file)
@@ -85,14 +85,14 @@ static void camelcounter_draw(void *phs)
   printf("------------------------------------------\n");
 }
 
-static void camelcounter_init(const char *optarg, void* userdata _U_)
+static void camelcounter_init(const char *opt_arg, void* userdata _U_)
 {
   struct camelcounter_t *p_camelcounter;
   GString *error_string;
 
   p_camelcounter = g_new(struct camelcounter_t,1);
-  if(!strncmp(optarg,"camel,counter,",13)){
-    p_camelcounter->filter=g_strdup(optarg+13);
+  if(!strncmp(opt_arg,"camel,counter,",13)){
+    p_camelcounter->filter=g_strdup(opt_arg+13);
   } else {
     p_camelcounter->filter=NULL;
   }
index 2eb78990a7b8e629032cfd1ca0bedfcb59405550..47712660ab7721e778addc73b57ed297532f3bd9 100644 (file)
@@ -199,14 +199,14 @@ static void camelsrt_draw(void *phs)
   printf("\n");
 }
 
-static void camelsrt_init(const char *optarg, void* userdata _U_)
+static void camelsrt_init(const char *opt_arg, void* userdata _U_)
 {
   struct camelsrt_t *p_camelsrt;
   GString *error_string;
 
   p_camelsrt = g_new(struct camelsrt_t,1);
-  if(!strncmp(optarg,"camel,srt,",9)){
-    p_camelsrt->filter=g_strdup(optarg+9);
+  if(!strncmp(opt_arg,"camel,srt,",9)){
+    p_camelsrt->filter=g_strdup(opt_arg+9);
   } else {
     p_camelsrt->filter=NULL;
   }
index a31931f3a5f70989c362529d1d54c134a3d23fa9..3d454281a3bffa666f6e11d6a553289e08d50c1a 100644 (file)
@@ -501,7 +501,7 @@ comparestat_draw(void *prs)
  * new instance for the compare tap.
  */
 static void
-comparestat_init(const char *optarg, void* userdata _U_)
+comparestat_init(const char *opt_arg, void* userdata _U_)
 {
        comparestat_t *cs;
        const char *filter=NULL;
@@ -509,12 +509,12 @@ comparestat_init(const char *optarg, void* userdata _U_)
        gint start, stop,ttl, order, pos=0;
        gdouble variance;
 
-       if(sscanf(optarg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
+       if(sscanf(opt_arg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
                if(pos){
-                       if(*(optarg+pos)==',')
-                               filter=optarg+pos+1;
+                       if(*(opt_arg+pos)==',')
+                               filter=opt_arg+pos+1;
                        else
-                               filter=optarg+pos;
+                               filter=opt_arg+pos;
                } else {
                        filter=NULL;
                }
index cc0afe7b7511837280321189a1cab8f2a487a607..9f3c9f23ec59716b9e3893ea381fb77001e65e71 100644 (file)
@@ -173,7 +173,7 @@ dcerpcstat_draw(void *prs)
 
 
 static void
-dcerpcstat_init(const char *optarg, void* userdata _U_)
+dcerpcstat_init(const char *opt_arg, void* userdata _U_)
 {
        rpcstat_t *rs;
        guint32 i, max_procs;
@@ -198,7 +198,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
         * report aggregate statistics for all minor version numbers
         * if it's omitted?
         */
-       if(sscanf(optarg,
+       if(sscanf(opt_arg,
                "dcerpc,srt,%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,%d.%d%n",
                &d1,&d2,&d3,&d40,&d41,&d42,&d43,&d44,&d45,&d46,&d47,
                &major,&minor,&pos)==13){
@@ -214,7 +214,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
                uuid.Data4[6]=d46;
                uuid.Data4[7]=d47;
                if(pos){
-                       filter=optarg+pos;
+                       filter=opt_arg+pos;
                } else {
                        filter=NULL;
                }
index ce773bfccb8b1672095562dbe57e7b39bd197f05..0e64cd2e07e8fb8e9d03ecb92fa3057c25810e7f 100644 (file)
@@ -213,7 +213,7 @@ diameteravp_draw(void* pds)
 
 
 static void
-diameteravp_init(const char *optarg, void* userdata _U_)
+diameteravp_init(const char *opt_arg, void* userdata _U_)
 {
        diameteravp_t *ds;
        gchar* field=NULL;
@@ -235,7 +235,7 @@ diameteravp_init(const char *optarg, void* userdata _U_)
        filter=g_string_new("diameter");
 
        /* Split command line options. */
-       tokens = g_strsplit(optarg,",", 1024);
+       tokens = g_strsplit(opt_arg,",", 1024);
        opt_count=0;
        while (tokens[opt_count])
                opt_count++;
index 7bc79f266d3421853bc74e22f159aa51d1dc73e0..4047e25e820be8e27dc67faf222e1e62e88dab8b 100644 (file)
@@ -190,7 +190,7 @@ expert_stat_draw(void *phs _U_)
 }
 
 /* Create a new expert stats struct */
-static void expert_stat_init(const char *optarg, void *userdata _U_)
+static void expert_stat_init(const char *opt_arg, void *userdata _U_)
 {
     const char        *args = NULL;
     const char        *filter = NULL;
@@ -199,9 +199,9 @@ static void expert_stat_init(const char *optarg, void *userdata _U_)
     int n;
 
     /* Check for args. */
-    if (strncmp(optarg, "expert", 6) == 0) {
+    if (strncmp(opt_arg, "expert", 6) == 0) {
         /* Skip those characters */
-        args = optarg + 6;
+        args = opt_arg + 6;
     }
     else {
         /* No args. Will show all reports, with no filter */
index 71ddd5898f4754c765882ab3d70d6b5cd015b42f..f4f6543b2c2e149bd04316280e7d3f2f9d482294 100644 (file)
@@ -718,15 +718,15 @@ done:
 
 static gboolean
 followArgStrncmp(
-  const char ** optargp,
+  const char ** opt_argp,
   const char *  strp
   )
 {
   int           len     = (guint32)strlen(strp);
 
-  if (strncmp(*optargp, strp, len) == 0)
+  if (strncmp(*opt_argp, strp, len) == 0)
   {
-    *optargp += len;
+    *opt_argp += len;
     return TRUE;
   }
   return FALSE;
@@ -734,19 +734,19 @@ followArgStrncmp(
 
 static void
 followArgMode(
-  const char ** optargp,
+  const char ** opt_argp,
   follow_t *    fp
   )
 {
-  if (followArgStrncmp(optargp, STR_HEX))
+  if (followArgStrncmp(opt_argp, STR_HEX))
   {
     fp->mode = mode_HEX;
   }
-  else if (followArgStrncmp(optargp, STR_ASCII))
+  else if (followArgStrncmp(opt_argp, STR_ASCII))
   {
     fp->mode = mode_ASCII;
   }
-  else if (followArgStrncmp(optargp, STR_RAW))
+  else if (followArgStrncmp(opt_argp, STR_RAW))
   {
     fp->mode = mode_RAW;
   }
@@ -758,7 +758,7 @@ followArgMode(
 
 static void
 followArgFilter(
-  const char ** optargp,
+  const char ** opt_argp,
   follow_t *    fp
   )
 {
@@ -774,17 +774,17 @@ followArgFilter(
   unsigned int  ii;
   char          addr[ADDR_LEN];
 
-  if (sscanf(*optargp, ",%u%n", &fp->index, &len) == 1 &&
-      ((*optargp)[len] == 0 || (*optargp)[len] == ','))
+  if (sscanf(*opt_argp, ",%u%n", &fp->index, &len) == 1 &&
+      ((*opt_argp)[len] == 0 || (*opt_argp)[len] == ','))
   {
-    *optargp += len;
+    *opt_argp += len;
   }
   else
   {
     for (ii = 0; ii < sizeof fp->addr/sizeof *fp->addr; ii++)
     {
-      if ((sscanf(*optargp, ADDRv6_FMT, addr, &fp->port[ii], &len) != 2 &&
-           sscanf(*optargp, ADDRv4_FMT, addr, &fp->port[ii], &len) != 2) ||
+      if ((sscanf(*opt_argp, ADDRv6_FMT, addr, &fp->port[ii], &len) != 2 &&
+           sscanf(*opt_argp, ADDRv4_FMT, addr, &fp->port[ii], &len) != 2) ||
           fp->port[ii] <= 0 || fp->port[ii] > G_MAXUINT16)
       {
         followExit("Invalid address:port pair.");
@@ -807,7 +807,7 @@ followArgFilter(
         SET_ADDRESS(&fp->addr[ii], AT_IPv4, 4, fp->addrBuf[ii]);
       }
 
-      *optargp += len;
+      *opt_argp += len;
     }
 
     if (fp->addr[0].type != fp->addr[1].type)
@@ -820,27 +820,27 @@ followArgFilter(
 
 static void
 followArgRange(
-  const char ** optargp,
+  const char ** opt_argp,
   follow_t *    fp
   )
 {
   int           len;
 
-  if (**optargp == 0)
+  if (**opt_argp == 0)
   {
     fp->chunkMin = 1;
     fp->chunkMax = G_MAXUINT32;
   }
   else
   {
-    if (sscanf(*optargp, ",%u-%u%n",  &fp->chunkMin, &fp->chunkMax, &len) == 2)
+    if (sscanf(*opt_argp, ",%u-%u%n",  &fp->chunkMin, &fp->chunkMax, &len) == 2)
     {
-      *optargp += len;
+      *opt_argp += len;
     }
-    else if (sscanf(*optargp, ",%u%n", &fp->chunkMin, &len) == 1)
+    else if (sscanf(*opt_argp, ",%u%n", &fp->chunkMin, &len) == 1)
     {
       fp->chunkMax = fp->chunkMin;
-      *optargp += len;
+      *opt_argp += len;
     }
     else
     {
@@ -856,10 +856,10 @@ followArgRange(
 
 static void
 followArgDone(
-  const char * optargp
+  const char * opt_argp
   )
 {
-  if (*optargp != 0)
+  if (*opt_argp != 0)
   {
     followExit("Invalid parameter.");
   }
@@ -867,21 +867,21 @@ followArgDone(
 
 static void
 followTcp(
-  const char *  optargp,
+  const char *  opt_argp,
   void *        userdata _U_
   )
 {
   follow_t *    fp;
   GString *     errp;
 
-  optargp += strlen(STR_FOLLOW_TCP);
+  opt_argp += strlen(STR_FOLLOW_TCP);
 
   fp = followAlloc(type_TCP);
 
-  followArgMode(&optargp, fp);
-  followArgFilter(&optargp, fp);
-  followArgRange(&optargp, fp);
-  followArgDone(optargp);
+  followArgMode(&opt_argp, fp);
+  followArgFilter(&opt_argp, fp);
+  followArgRange(&opt_argp, fp);
+  followArgDone(opt_argp);
 
   reset_tcp_reassembly();
   if (fp->index != G_MAXUINT32)
@@ -914,21 +914,21 @@ followTcp(
 
 static void
 followUdp(
-  const char *  optargp,
+  const char *  opt_argp,
   void *        userdata _U_
   )
 {
   follow_t *    fp;
   GString *     errp;
 
-  optargp += strlen(STR_FOLLOW_UDP);
+  opt_argp += strlen(STR_FOLLOW_UDP);
 
   fp = followAlloc(type_UDP);
 
-  followArgMode(&optargp, fp);
-  followArgFilter(&optargp, fp);
-  followArgRange(&optargp, fp);
-  followArgDone(optargp);
+  followArgMode(&opt_argp, fp);
+  followArgFilter(&opt_argp, fp);
+  followArgRange(&opt_argp, fp);
+  followArgDone(opt_argp);
 
   if (fp->index != G_MAXUINT32)
   {
@@ -949,21 +949,21 @@ followUdp(
 
 static void
 followSsl(
-  const char *  optargp,
+  const char *  opt_argp,
   void *        userdata _U_
   )
 {
   follow_t *    fp;
   GString *     errp;
 
-  optargp += strlen(STR_FOLLOW_SSL);
+  opt_argp += strlen(STR_FOLLOW_SSL);
 
   fp = followAlloc(type_SSL);
 
-  followArgMode(&optargp, fp);
-  followArgFilter(&optargp, fp);
-  followArgRange(&optargp, fp);
-  followArgDone(optargp);
+  followArgMode(&opt_argp, fp);
+  followArgFilter(&opt_argp, fp);
+  followArgRange(&opt_argp, fp);
+  followArgDone(opt_argp);
 
   if (fp->index == G_MAXUINT32)
   {
index acbc89cbd4b08cffbc28586ea720956e5bde2c9a..673082e1a81a771903490c7dedf71d4615e03b1e 100644 (file)
@@ -150,8 +150,8 @@ typedef struct _menu_cb_t {
 } menu_cb_t;
 
 
-static void  init_funnel_cmd(const char *optarg, void* data ) {
-    gchar** args = g_strsplit(optarg,",",0); 
+static void  init_funnel_cmd(const char *opt_arg, void* data ) {
+    gchar** args = g_strsplit(opt_arg,",",0); 
     gchar** arg;
     menu_cb_t* mcb = data;
     
index f35821897903b452bc03b0f1e0ba1793192b5b04..b76932a2b10cd58ef8b56f367f2de9fa9a3590cf 100644 (file)
@@ -315,7 +315,7 @@ gsm_a_stat_draw(
 
 
 static void
-gsm_a_stat_init(const char *optarg _U_,void* userdata _U_)
+gsm_a_stat_init(const char *opt_arg _U_,void* userdata _U_)
 {
     gsm_a_stat_t       *stat_p;
     GString            *err_p;
index fe1a8141fcfa00ac7d88b275384c02f4cdc807cc..e84d9df4f170122215d46da1e4b9c433c0877175 100644 (file)
@@ -343,14 +343,14 @@ h225counter_draw(void *phs)
 
 
 static void
-h225counter_init(const char *optarg, void* userdata _U_)
+h225counter_init(const char *opt_arg, void* userdata _U_)
 {
        h225counter_t *hs;
        GString *error_string;
 
        hs = g_new(h225counter_t,1);
-       if(!strncmp(optarg,"h225,counter,",13)){
-               hs->filter=g_strdup(optarg+13);
+       if(!strncmp(opt_arg,"h225,counter,",13)){
+               hs->filter=g_strdup(opt_arg+13);
        } else {
                hs->filter=NULL;
        }
index 8cf596bdc4507160e4f3052df0345a3b2d84faab..433198246ef601ba4009f31d032e271a356dba6d 100644 (file)
@@ -205,14 +205,14 @@ h225rassrt_draw(void *phs)
 
 
 static void
-h225rassrt_init(const char *optarg, void* userdata _U_)
+h225rassrt_init(const char *opt_arg, void* userdata _U_)
 {
        h225rassrt_t *hs;
        GString *error_string;
 
        hs = g_new(h225rassrt_t,1);
-       if(!strncmp(optarg,"h225,srt,",9)){
-               hs->filter=g_strdup(optarg+9);
+       if(!strncmp(opt_arg,"h225,srt,",9)){
+               hs->filter=g_strdup(opt_arg+9);
        } else {
                hs->filter=NULL;
        }
index 5e397feb1519aca6c283f797e0d38ccc57106f89..ba8723bf1058b1250bc57efa4eefde759d868d50 100644 (file)
@@ -128,7 +128,7 @@ hosts_draw(void *dummy _U_)
 
 
 static void
-hosts_init(const char *optarg, void* userdata _U_)
+hosts_init(const char *opt_arg, void* userdata _U_)
 {
        GString *error_string;
        gchar **tokens;
@@ -137,12 +137,12 @@ hosts_init(const char *optarg, void* userdata _U_)
        dump_v4 = FALSE;
        dump_v6 = FALSE;
 
-       if(strcmp(TAP_NAME, optarg)==0) {
+       if(strcmp(TAP_NAME, opt_arg)==0) {
                /* No arguments; dump everything */
                dump_v4 = TRUE;
                dump_v6 = TRUE;
        } else {
-               tokens = g_strsplit(optarg,",", 0);
+               tokens = g_strsplit(opt_arg,",", 0);
                opt_count=0;
                while (tokens[opt_count]) {
                        if (strcmp("ipv4", tokens[opt_count]) == 0) {
index f5e6eb6e1b21a7992a7725d11a762f4dc0ea0c29..122b686811538757dd457c9c626cb6b9fdbf0daa 100644 (file)
@@ -278,14 +278,14 @@ httpstat_draw(void *psp  )
 /* When called, this function will create a new instance of gtk_httpstat.
  */
 static void
-gtk_httpstat_init(const char *optarg,void* userdata _U_)
+gtk_httpstat_init(const char *opt_arg,void* userdata _U_)
 {
        httpstat_t *sp;
        const char *filter=NULL;
        GString *error_string;
 
-       if (!strncmp (optarg, "http,stat,", 10)){
-               filter=optarg+10;
+       if (!strncmp (opt_arg, "http,stat,", 10)){
+               filter=opt_arg+10;
        } else {
                filter=NULL;
        }
index 39c0c10e96849105dd0e79fd77f716b49cc9e9d5..0e89b3d844f259d084df93100db46307140cd54a 100644 (file)
@@ -263,14 +263,14 @@ icmpstat_draw(void *tapdata)
  * instance for the icmp tap.
  */
 static void
-icmpstat_init(const char *optarg, void* userdata _U_)
+icmpstat_init(const char *opt_arg, void* userdata _U_)
 {
     icmpstat_t *icmpstat;
     const char *filter = NULL;
     GString *error_string;
 
-    if (strstr(optarg, "icmp,srt,"))
-        filter = optarg + strlen("icmp,srt,");
+    if (strstr(opt_arg, "icmp,srt,"))
+        filter = opt_arg + strlen("icmp,srt,");
 
     icmpstat = (icmpstat_t *)g_try_malloc(sizeof(icmpstat_t));
     if (icmpstat == NULL) {
index 88bb472b53b8273d0135ba2eaf7d84b0fcb8d39a..cfe0a026292122c07d33fbe9cfeed6ff02084ee9 100644 (file)
@@ -264,14 +264,14 @@ icmpv6stat_draw(void *tapdata)
  * instance for the icmpv6 tap.
  */
 static void
-icmpv6stat_init(const char *optarg, void* userdata _U_)
+icmpv6stat_init(const char *opt_arg, void* userdata _U_)
 {
     icmpv6stat_t *icmpv6stat;
     const char *filter = NULL;
     GString *error_string;
 
-    if (strstr(optarg, "icmpv6,srt,"))
-        filter = optarg + strlen("icmpv6,srt,");
+    if (strstr(opt_arg, "icmpv6,srt,"))
+        filter = opt_arg + strlen("icmpv6,srt,");
 
     icmpv6stat = (icmpv6stat_t *)g_try_malloc(sizeof(icmpv6stat_t));
     if (icmpv6stat == NULL) {
index 4c1079021993386cd7bba0add9eb03c56ff1c09f..b6835946bda86d7cc18645f6f523345fa30f2fed 100644 (file)
@@ -1304,7 +1304,7 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
 }
 
 static void
-iostat_init(const char *optarg, void* userdata _U_)
+iostat_init(const char *opt_arg, void* userdata _U_)
 {
     gdouble interval_float;
     guint32 idx=0;
@@ -1312,14 +1312,14 @@ iostat_init(const char *optarg, void* userdata _U_)
     io_stat_t *io;
     const gchar *filters, *str, *pos;
 
-    if ((*(optarg+(strlen(optarg)-1)) == ',') ||
-        (sscanf(optarg, "io,stat,%lf%n", &interval_float, (int *)&idx) != 1) ||
+    if ((*(opt_arg+(strlen(opt_arg)-1)) == ',') ||
+        (sscanf(opt_arg, "io,stat,%lf%n", &interval_float, (int *)&idx) != 1) ||
         (idx < 8)) {
         fprintf(stderr, "\ntshark: invalid \"-z io,stat,<interval>[,<filter>][,<filter>]...\" argument\n");
         exit(1);
     }
 
-    filters=optarg+idx;
+    filters=opt_arg+idx;
     if (*filters) {
         if (*filters != ',') {
             /* For locale's that use ',' instead of '.', the comma might
@@ -1371,7 +1371,7 @@ iostat_init(const char *optarg, void* userdata _U_)
                interval of 1 and the last interval becomes "9 <> 9". If the interval is instead set to
                1.1, the last interval becomes
                last interval is rounded up to value that is greater than the duration. */
-            const gchar *invl_start = optarg+8;
+            const gchar *invl_start = opt_arg+8;
             gchar *intv_end;
             int invl_len;
 
index beeef9084ebfea1e980488fccff122625772acff..b51d708e59546754bf090d1738fd105c00ebf52d 100644 (file)
@@ -449,7 +449,7 @@ iousers_draw(void *arg)
 }
 
 static void
-iousers_init(const char *optarg, void* userdata _U_)
+iousers_init(const char *opt_arg, void* userdata _U_)
 {
        const char *filter=NULL;
        const char *tap_type, *tap_type_name;
@@ -457,90 +457,90 @@ iousers_init(const char *optarg, void* userdata _U_)
        io_users_t *iu=NULL;
        GString *error_string;
 
-       if(!strncmp(optarg,"conv,eth",8)){
-               if(optarg[8]==','){
-                       filter=optarg+9;
+       if(!strncmp(opt_arg,"conv,eth",8)){
+               if(opt_arg[8]==','){
+                       filter=opt_arg+9;
                } else {
                        filter=NULL;
                }
                tap_type="eth";
                tap_type_name="Ethernet";
                packet_func=iousers_eth_packet;
-       } else if(!strncmp(optarg,"conv,fc",7)){
-               if(optarg[7]==','){
-                       filter=optarg+8;
+       } else if(!strncmp(opt_arg,"conv,fc",7)){
+               if(opt_arg[7]==','){
+                       filter=opt_arg+8;
                } else {
                        filter=NULL;
                }
                tap_type="fc";
                tap_type_name="Fibre Channel";
                packet_func=iousers_fc_packet;
-       } else if(!strncmp(optarg,"conv,fddi",9)){
-               if(optarg[9]==','){
-                       filter=optarg+10;
+       } else if(!strncmp(opt_arg,"conv,fddi",9)){
+               if(opt_arg[9]==','){
+                       filter=opt_arg+10;
                } else {
                        filter=NULL;
                }
                tap_type="fddi";
                tap_type_name="FDDI";
                packet_func=iousers_fddi_packet;
-       } else if(!strncmp(optarg,"conv,tcp",8)){
-               if(optarg[8]==','){
-                       filter=optarg+9;
+       } else if(!strncmp(opt_arg,"conv,tcp",8)){
+               if(opt_arg[8]==','){
+                       filter=opt_arg+9;
                } else {
                        filter=NULL;
                }
                tap_type="tcp";
                tap_type_name="TCP";
                packet_func=iousers_tcpip_packet;
-       } else if(!strncmp(optarg,"conv,udp",8)){
-               if(optarg[8]==','){
-                       filter=optarg+9;
+       } else if(!strncmp(opt_arg,"conv,udp",8)){
+               if(opt_arg[8]==','){
+                       filter=opt_arg+9;
                } else {
                        filter=NULL;
                }
                tap_type="udp";
                tap_type_name="UDP";
                packet_func=iousers_udpip_packet;
-       } else if(!strncmp(optarg,"conv,tr",7)){
-               if(optarg[7]==','){
-                       filter=optarg+8;
+       } else if(!strncmp(opt_arg,"conv,tr",7)){
+               if(opt_arg[7]==','){
+                       filter=opt_arg+8;
                } else {
                        filter=NULL;
                }
                tap_type="tr";
                tap_type_name="Token Ring";
                packet_func=iousers_tr_packet;
-       } else if(!strncmp(optarg,"conv,ipx",8)){
-               if(optarg[8]==','){
-                       filter=optarg+9;
+       } else if(!strncmp(opt_arg,"conv,ipx",8)){
+               if(opt_arg[8]==','){
+                       filter=opt_arg+9;
                } else {
                        filter=NULL;
                }
                tap_type="ipx";
                tap_type_name="IPX";
                packet_func=iousers_ipx_packet;
-       } else if(!strncmp(optarg,"conv,ipv6",9)){
-               if(optarg[9]==','){
-                       filter=optarg+10;
+       } else if(!strncmp(opt_arg,"conv,ipv6",9)){
+               if(opt_arg[9]==','){
+                       filter=opt_arg+10;
                } else {
                        filter=NULL;
                }
                tap_type="ipv6";
                tap_type_name="IPv6";
                packet_func=iousers_ipv6_packet;
-       } else if(!strncmp(optarg,"conv,ip",7)){
-               if(optarg[7]==','){
-                       filter=optarg+8;
+       } else if(!strncmp(opt_arg,"conv,ip",7)){
+               if(opt_arg[7]==','){
+                       filter=opt_arg+8;
                } else {
                        filter=NULL;
                }
                tap_type="ip";
                tap_type_name="IPv4";
                packet_func=iousers_ip_packet;
-       } else if(!strncmp(optarg,"conv,sctp",9)) {
-               if(optarg[9]==','){
-                               filter=optarg+10;
+       } else if(!strncmp(opt_arg,"conv,sctp",9)) {
+               if(opt_arg[9]==','){
+                               filter=opt_arg+10;
                } else {
                         filter=NULL;
                 }
index d6f0ccd477da68127ff8eeab4e35738fcac2fa52..c841d0a590103af6fd6dc172bdc35f97dcb736e3 100644 (file)
@@ -508,16 +508,16 @@ mac_lte_stat_draw(void *phs)
 }
 
 /* Create a new MAC LTE stats struct */
-static void mac_lte_stat_init(const char *optarg, void *userdata _U_)
+static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
 {
     mac_lte_stat_t    *hs;
     const char    *filter = NULL;
     GString       *error_string;
 
     /* Check for a filter string */
-    if (strncmp(optarg, "mac-lte,stat,", 13) == 0) {
+    if (strncmp(opt_arg, "mac-lte,stat,", 13) == 0) {
         /* Skip those characters from filter to display */
-        filter = optarg + 13;
+        filter = opt_arg + 13;
     }
     else {
         /* No filter */
index 546d2c65b8065f24046580716325413c36ff2620..325caa154bc6fa9d7e82e75930f44f4e1c392f4a 100644 (file)
@@ -72,7 +72,7 @@ megacostat_draw(void *pms)
 
 
 static void
-megacostat_init(const char *optarg, void* userdata _U_)
+megacostat_init(const char *opt_arg, void* userdata _U_)
 {
        megacostat_t *ms;
        int i;
@@ -94,8 +94,8 @@ megacostat_init(const char *optarg, void* userdata _U_)
        }
 
        ms=g_new(megacostat_t,1);
-       if(!strncmp(optarg,"megaco,rtd,",11)){
-               ms->filter=g_strdup(optarg+11);
+       if(!strncmp(opt_arg,"megaco,rtd,",11)){
+               ms->filter=g_strdup(opt_arg+11);
        } else {
                ms->filter=NULL;
        }
index 2c764e2b15023b33305dffe8cbf459c055613000..d901bbd0e9e7ce918b374af94046aa2bed25a750 100644 (file)
@@ -169,15 +169,15 @@ mgcpstat_draw(void *pms)
 
 
 static void
-mgcpstat_init(const char *optarg, void* userdata _U_)
+mgcpstat_init(const char *opt_arg, void* userdata _U_)
 {
        mgcpstat_t *ms;
        int i;
        GString *error_string;
 
        ms=g_new(mgcpstat_t,1);
-       if(!strncmp(optarg,"mgcp,rtd,",9)){
-               ms->filter=g_strdup(optarg+9);
+       if(!strncmp(opt_arg,"mgcp,rtd,",9)){
+               ms->filter=g_strdup(opt_arg+9);
        } else {
                ms->filter=NULL;
        }
index 7324b6893220abec3eef45fe0bd930e18dbad6d3..6138f34e50ebbb64fcb4ee634adad9624af6ca33 100644 (file)
@@ -81,7 +81,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
 
 
 static void
-protocolinfo_init(const char *optarg, void* userdata _U_)
+protocolinfo_init(const char *opt_arg, void* userdata _U_)
 {
        pci_t *rs;
        const char *field=NULL;
@@ -89,8 +89,8 @@ protocolinfo_init(const char *optarg, void* userdata _U_)
        header_field_info *hfi;
        GString *error_string;
 
-       if(!strncmp("proto,colinfo,",optarg,14)){
-               filter=optarg+14;
+       if(!strncmp("proto,colinfo,",opt_arg,14)){
+               filter=opt_arg+14;
                field=strchr(filter,',');
                if(field){
                        field+=1;  /* skip the ',' */
index e9308045fa3b78071bbbf145d86faafa45e8ec5a..aa544f78fce82ad431cd92d3eb9a3e678faf5313 100644 (file)
@@ -166,18 +166,18 @@ protohierstat_draw(void *prs)
 
 
 static void
-protohierstat_init(const char *optarg, void* userdata _U_)
+protohierstat_init(const char *opt_arg, void* userdata _U_)
 {
        phs_t *rs;
        int pos=0;
        const char *filter=NULL;
        GString *error_string;
 
-       if(strcmp("io,phs",optarg)==0){
+       if(strcmp("io,phs",opt_arg)==0){
                /* No arguments */
-       } else if(sscanf(optarg,"io,phs,%n",&pos)==0){
+       } else if(sscanf(opt_arg,"io,phs,%n",&pos)==0){
                if(pos){
-                       filter=optarg+pos;
+                       filter=opt_arg+pos;
                }
        } else {
                fprintf(stderr, "tshark: invalid \"-z io,phs[,<filter>]\" argument\n");
index 42f6e7f8fea03a4887f2196ca7d48d85399b3bed..c75cfc168e6400481de8a967ec128b086d8114a8 100644 (file)
@@ -185,15 +185,15 @@ radiusstat_draw(void *prs)
 
 
 static void
-radiusstat_init(const char *optarg, void* userdata _U_)
+radiusstat_init(const char *opt_arg, void* userdata _U_)
 {
        radiusstat_t *rs;
        int i;
        GString *error_string;
 
        rs=g_new(radiusstat_t,1);
-       if(!strncmp(optarg,"radius,rtd,",11)){
-               rs->filter=g_strdup(optarg+11);
+       if(!strncmp(opt_arg,"radius,rtd,",11)){
+               rs->filter=g_strdup(opt_arg+11);
        } else {
                rs->filter=NULL;
        }
index 3aa87bcb20d09c3668ea544111da0ed1c70c0859..d78d062efcb5691eb2f42adb2670b7b7b25b9b5c 100644 (file)
@@ -362,16 +362,16 @@ rlc_lte_stat_draw(void *phs)
 
 
 /* Create a new RLC LTE stats struct */
-static void rlc_lte_stat_init(const char *optarg, void *userdata _U_)
+static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
 {
     rlc_lte_stat_t    *hs;
     const char        *filter = NULL;
     GString           *error_string;
 
     /* Check for a filter string */
-    if (strncmp(optarg, "rlc-lte,stat,", 13) == 0) {
+    if (strncmp(opt_arg, "rlc-lte,stat,", 13) == 0) {
         /* Skip those characters from filter to display */
-        filter = optarg + 13;
+        filter = opt_arg + 13;
     }
     else {
         /* No filter */
index 900621d724515f1c408bfd48899dff5cbdb4ae32..f1fb0444f013ef8fd88ce597eb6ddf4647266485 100644 (file)
@@ -206,7 +206,7 @@ rpcprogs_draw(void *dummy _U_)
 
 
 static void
-rpcprogs_init(const char *optarg _U_, void* userdata _U_)
+rpcprogs_init(const char *opt_arg _U_, void* userdata _U_)
 {
        GString *error_string;
 
index 9a34faec7b7140a2121af60a87c7f23da88f7631..82a18564686199afac235328d71fe721e381d6a6 100644 (file)
@@ -262,7 +262,7 @@ rpcstat_find_procs(gpointer *key, gpointer *value _U_, gpointer *user_data _U_)
  * instance for the rpc tap.
  */
 static void
-rpcstat_init(const char *optarg, void* userdata _U_)
+rpcstat_init(const char *opt_arg, void* userdata _U_)
 {
        rpcstat_t *rs;
        guint32 i;
@@ -271,9 +271,9 @@ rpcstat_init(const char *optarg, void* userdata _U_)
        const char *filter=NULL;
        GString *error_string;
 
-       if(sscanf(optarg,"rpc,srt,%d,%d,%n",&program,&version,&pos)==2){
+       if(sscanf(opt_arg,"rpc,srt,%d,%d,%n",&program,&version,&pos)==2){
                if(pos){
-                       filter=optarg+pos;
+                       filter=opt_arg+pos;
                } else {
                        filter=NULL;
                }
index c07b1a29f3403e0d307092aa2b6d990258118849..da8809590f4675d8f7b22530b3c21b2cabca5937 100644 (file)
@@ -131,7 +131,7 @@ rtp_streams_stat_draw(void *arg _U_)
 
 
 static void
-rtp_streams_stat_init(const char *optarg _U_, void* userdata _U_)
+rtp_streams_stat_init(const char *opt_arg _U_, void* userdata _U_)
 {
     GString            *err_p;
 
index 57623d6d616cb6c3d14d3a048c99809188f52411..fb073a0f42a2e8ec1797afcb7022e8d94435d459 100644 (file)
@@ -231,14 +231,14 @@ rtspstat_draw(void *psp  )
 /* When called, this function will create a new instance of gtk_rtspstat.
  */
 static void
-gtk_rtspstat_init(const char *optarg,void* userdata _U_)
+gtk_rtspstat_init(const char *opt_arg,void* userdata _U_)
 {
        rtspstat_t *sp;
        const char *filter=NULL;
        GString *error_string;
        
-       if (!strncmp (optarg, "rtsp,stat,", 10)){
-               filter=optarg+10;
+       if (!strncmp (opt_arg, "rtsp,stat,", 10)){
+               filter=opt_arg+10;
        } else {
                filter=NULL;
        }
index c479f8dc2783ef3ddc19fe17e7b266d01b0f4e9a..31a2cff8a3a8837065a372536ea0d002ff7c2b0c 100644 (file)
@@ -168,7 +168,7 @@ scsistat_draw(void *prs)
 }
 
 static void
-scsistat_init(const char *optarg, void* userdata _U_)
+scsistat_init(const char *opt_arg, void* userdata _U_)
 {
        scsistat_t *rs;
        guint32 i;
@@ -177,9 +177,9 @@ scsistat_init(const char *optarg, void* userdata _U_)
        GString *error_string;
 
        pos=0;
-       if(sscanf(optarg, "scsi,srt,%d,%n", &program, &pos)==1) {
+       if(sscanf(opt_arg, "scsi,srt,%d,%n", &program, &pos)==1) {
                if(pos) {
-                       filter=optarg+pos;
+                       filter=opt_arg+pos;
                } else {
                        filter=NULL;
                }
index 1b0f26c13457981cb31bd7660a4aea3536e120cd..9f69774177afdaac274bac2aae0e6a29497321cf 100644 (file)
@@ -211,14 +211,14 @@ sctpstat_draw(void *phs)
 
 
 static void
-sctpstat_init(const char *optarg, void* userdata _U_)
+sctpstat_init(const char *opt_arg, void* userdata _U_)
 {
        sctpstat_t *hs;
        GString *error_string;
 
        hs = (sctpstat_t *)g_malloc(sizeof(sctpstat_t));
-       if(!strncmp(optarg,"sctp,stat,",11)){
-               hs->filter=g_strdup(optarg+11);
+       if(!strncmp(opt_arg,"sctp,stat,",11)){
+               hs->filter=g_strdup(opt_arg+11);
        } else {
                hs->filter=NULL;
        }
index 4c57f806fc918984c08468c4dd99c0968ea6a80e..2eaf370730cd57c4adee6c1ce5aa659fd9a2fe34 100644 (file)
@@ -386,14 +386,14 @@ sipstat_draw(void *psp  )
 }
 
 static void
-sipstat_init(const char *optarg, void* userdata _U_)
+sipstat_init(const char *opt_arg, void* userdata _U_)
 {
        sipstat_t *sp;
        const char *filter=NULL;
        GString *error_string;
 
-       if (strncmp (optarg, "sip,stat,", 9) == 0){
-               filter=optarg+9;
+       if (strncmp (opt_arg, "sip,stat,", 9) == 0){
+               filter=opt_arg+9;
        } else {
                filter=NULL;
        }
index e5c65e9039f65ce2283d954257bebbd7c2d0fd72..c065873e0c579509f988c033cda077d80c84ca14 100644 (file)
@@ -62,7 +62,7 @@ smbsids_draw(void *pss _U_)
 
 
 static void
-smbsids_init(const char *optarg _U_, void* userdata _U_)
+smbsids_init(const char *opt_arg _U_, void* userdata _U_)
 {
        GString *error_string;
 
index a1c6a9b761bb824b86c6c0f74d7bc75645eff22a..69fccaccbd0efcb9f4f8376ef62ea5de1ff8ea36 100644 (file)
@@ -180,15 +180,15 @@ smbstat_draw(void *pss)
 
 
 static void
-smbstat_init(const char *optarg,void* userdata _U_)
+smbstat_init(const char *opt_arg,void* userdata _U_)
 {
        smbstat_t *ss;
        guint32 i;
        const char *filter=NULL;
        GString *error_string;
 
-       if(!strncmp(optarg,"smb,srt,",8)){
-               filter=optarg+8;
+       if(!strncmp(opt_arg,"smb,srt,",8)){
+               filter=opt_arg+8;
        } else {
                filter=NULL;
        }
index 2861b2394de69c34224d1c98a972ae68195489e5..58201a7df77cb66e2aea313822a538a0b1ddbcc8 100644 (file)
@@ -72,9 +72,9 @@ draw_stats_tree(void *psp)
 }
 
 static void
-init_stats_tree(const char *optarg, void *userdata _U_)
+init_stats_tree(const char *opt_arg, void *userdata _U_)
 {
-       char *abbr = stats_tree_get_abbr(optarg);
+       char *abbr = stats_tree_get_abbr(opt_arg);
        GString *error_string;
        stats_tree_cfg *cfg = NULL;
        stats_tree *st = NULL;
@@ -83,8 +83,8 @@ init_stats_tree(const char *optarg, void *userdata _U_)
                cfg = stats_tree_get_cfg_by_abbr(abbr);
 
                if (cfg != NULL) {
-                       if (strncmp (optarg, cfg->pr->init_string, strlen(cfg->pr->init_string)) == 0){
-                               st = stats_tree_new(cfg,NULL,optarg+strlen(cfg->pr->init_string));
+                       if (strncmp (opt_arg, cfg->pr->init_string, strlen(cfg->pr->init_string)) == 0){
+                               st = stats_tree_new(cfg,NULL,opt_arg+strlen(cfg->pr->init_string));
                        } else {
                                report_failure("Wrong stats_tree (%s) found when looking at ->init_string",abbr);
                                return;
@@ -97,7 +97,7 @@ init_stats_tree(const char *optarg, void *userdata _U_)
                g_free(abbr);
                
        } else {
-               report_failure("could not obtain stats_tree abbr (%s) from arg '%s'",abbr,optarg);              
+               report_failure("could not obtain stats_tree abbr (%s) from arg '%s'",abbr,opt_arg);             
                return;
        }
        
index 8f2960a297aed7d1cba262fd52aa41c4c4e06367..81f3070b8a1f28044fa5e65156a23149a8858940 100644 (file)
@@ -52,7 +52,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
 }
 
 static void
-svstat_init(const char *optarg _U_, void* userdata _U_)
+svstat_init(const char *opt_arg _U_, void* userdata _U_)
 {
        GString *error_string;
 
index 165f78d0c83964db5ad8ae03ccf59c48d122f7b8..0bf539ea9caf7f6d57bd048ff539cd1f4effa350 100644 (file)
@@ -207,7 +207,7 @@ wspstat_draw(void *psp)
  * new instance for the wsp tap.
  */
 static void
-wspstat_init(const char *optarg, void* userdata _U_)
+wspstat_init(const char *opt_arg, void* userdata _U_)
 {
        wspstat_t          *sp;
        const char         *filter=NULL;
@@ -216,8 +216,8 @@ wspstat_init(const char *optarg, void* userdata _U_)
        wsp_status_code_t  *sc;
        const value_string *wsp_vals_status_p;
 
-       if (!strncmp (optarg, "wsp,stat," , 9)){
-               filter=optarg+9;
+       if (!strncmp (opt_arg, "wsp,stat," , 9)){
+               filter=opt_arg+9;
        } else {
                filter=NULL;
        }