Remove uninitalized variable warning
[obnox/wireshark/wip.git] / tap-httpstat.c
index 2e5e3454ad9fc2712c96269d4d5e1025e6967949..e957588b0d06068fec460755de4e5ac922ed4318 100644 (file)
@@ -32,6 +32,7 @@
 #include "epan/packet_info.h"
 #include "epan/value_string.h"
 #include <epan/tap.h>
+#include <epan/stat_cmd_args.h>
 #include "register.h"
 #include <epan/dissectors/packet-http.h>
 
@@ -49,7 +50,7 @@ typedef struct _http_stats_t {
 typedef struct _http_response_code_t {
        guint32          packets;               /* 3 */
        guint            response_code;         /* 404 */
-       gchar           *name;                  /* Not Found */
+       const gchar     *name;                  /* Not Found */
        httpstat_t      *sp;
 } http_response_code_t;
 
@@ -280,10 +281,10 @@ httpstat_draw(void *psp  )
 /* When called, this function will create a new instance of gtk_httpstat.
  */
 static void
-gtk_httpstat_init(char *optarg)
+gtk_httpstat_init(const char *optarg)
 {
        httpstat_t *sp;
-       char *filter=NULL;
+       const char *filter=NULL;
        GString *error_string;
        
        if (!strncmp (optarg, "http,stat,", 10)){
@@ -313,7 +314,7 @@ gtk_httpstat_init(char *optarg)
                /* error, we failed to attach to the tap. clean up */
                g_free(sp->filter);
                g_free(sp);
-               fprintf (stderr, "tethereal: Coulnd't register http,stat tap: %s\n",
+               fprintf (stderr, "tethereal: Couldn't register http,stat tap: %s\n",
                                error_string->str);
                g_string_free(error_string, TRUE);
                exit(1);
@@ -325,5 +326,5 @@ gtk_httpstat_init(char *optarg)
 void
 register_tap_listener_gtkhttpstat(void)
 {
-       register_ethereal_tap("http,stat,", gtk_httpstat_init);
+       register_stat_cmd_arg("http,stat,", gtk_httpstat_init);
 }