redirect: Make sure op_table is pointered vfunc table

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2017-10-22 01:04:27 +01:00
parent 30152b9604
commit e73d384726
2 changed files with 2 additions and 7 deletions
+1 -4
View File
@@ -18,10 +18,7 @@
LsiRedirectProfile *lsi_redirect_profile_new(const char *name)
{
LsiRedirectProfile p = {
.name = strdup(name),
.op_table = {{ 0 }},
};
LsiRedirectProfile p = { .name = strdup(name), { 0 } };
LsiRedirectProfile *ret = NULL;
if (!p.name) {
return NULL;
+1 -3
View File
@@ -53,10 +53,9 @@ typedef enum { LSI_OPERATION_OPEN = 0, LSI_NUM_OPERATIONS } LsiRedirectOperation
typedef struct LsiRedirectProfile {
char *name; /**< Name for this profile */
LsiRedirect op_table[LSI_NUM_OPERATIONS]; /* vtable information */
LsiRedirect *op_table[LSI_NUM_OPERATIONS]; /* vtable information */
} LsiRedirectProfile;
/**
* Construct a new LsiRedirectProfile
*
@@ -72,7 +71,6 @@ LsiRedirectProfile *lsi_redirect_profile_new(const char *name);
*/
void lsi_redirect_profile_free(LsiRedirectProfile *profile);
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*