X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Foption.c;h=eb62e6c354da31c13b9b5e5691139a9c545eb322;hb=48f6f3c280c4b511fdbdc3a650b2f4aa7040fc97;hp=0ab381f775d39ca27fa25c035afd0d26afbd3daa;hpb=f68ad60df1c702e550a78244984abd5cffec16d0;p=lttv.git diff --git a/ltt/branches/poly/lttv/option.c b/ltt/branches/poly/lttv/option.c index 0ab381f7..eb62e6c3 100644 --- a/ltt/branches/poly/lttv/option.c +++ b/ltt/branches/poly/lttv/option.c @@ -64,14 +64,15 @@ void lttv_option_init(int argc, char **argv) { void lttv_option_destroy() { struct poptOption *poption; + + int i; - for(i=0; ilen,i++) { + for(i=0; i < lttv_options_command_popt->len ; i++) { poption = &g_array_index (lttv_options_command_popt, struct poptOption, i); - g_free(poption.longName); - g_free(poption.shortName); - g_free(poption.descrip); - g_free(poption.argDescrip); + g_free((gpointer)poption->longName); + g_free((gpointer)poption->descrip); + g_free((gpointer)poption->argDescrip); } g_array_free(lttv_options_command_popt,TRUE) ; g_array_free(lttv_options_command,TRUE) ; @@ -95,7 +96,7 @@ static int poptToLTT[] = { void lttv_option_add(const char *long_name, const char char_name, const char *description, const char *argDescription, - const lttv_option_type t, const void *p, + const lttv_option_type t, void *p, const lttv_option_hook h, void *hook_data) { struct poptOption poption;