From 150ef81ae7d13cf57458720cd531b79e26d46662 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 2 Jun 2003 14:34:26 +0000 Subject: [PATCH] fixes git-svn-id: http://ltt.polymtl.ca/svn@80 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/option.c | 13 +++++++------ ltt/branches/poly/lttv/option.h | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) 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; diff --git a/ltt/branches/poly/lttv/option.h b/ltt/branches/poly/lttv/option.h index bcc086a3..09fd803b 100644 --- a/ltt/branches/poly/lttv/option.h +++ b/ltt/branches/poly/lttv/option.h @@ -21,8 +21,8 @@ typedef void (*lttv_option_hook)(void *hook_data); void lttv_option_add(const char *long_name, const char char_name, const char *description, const char *argDescription, - lttv_option_type t, void *p, lttv_option_hook h, - void *hook_data); + const lttv_option_type t, void *p, + const lttv_option_hook h, void *hook_data); -- 2.34.1