diff options
author | Denis Kenzior <denkenz@gmail.com> | 2015-12-03 18:06:06 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2015-12-03 18:06:06 -0600 |
commit | 868d425efb3c8668c179783ccaad94be0fec2946 (patch) | |
tree | fd8ad61a3600fd092c61e7f783286907728fbb86 | |
parent | 7641318e46304ba1e603156dae5ca78091e35e4b (diff) | |
download | ofono-868d425efb3c8668c179783ccaad94be0fec2946.tar.bz2 |
gril: Remove unused str_array functions
-rw-r--r-- | gril/parcel.c | 35 | ||||
-rw-r--r-- | gril/parcel.h | 7 |
2 files changed, 0 insertions, 42 deletions
diff --git a/gril/parcel.c b/gril/parcel.c index 45219f15..1cfc68a5 100644 --- a/gril/parcel.c +++ b/gril/parcel.c @@ -278,41 +278,6 @@ size_t parcel_data_avail(struct parcel *p) return p->size - p->offset; } -struct parcel_str_array *parcel_r_str_array(struct parcel *p) -{ - int i; - struct parcel_str_array *str_arr; - int num_str = parcel_r_int32(p); - - if (p->malformed || num_str <= 0) - return NULL; - - str_arr = g_try_malloc0(sizeof(*str_arr) + num_str * sizeof(char *)); - if (str_arr == NULL) - return NULL; - - str_arr->num_str = num_str; - for (i = 0; i < num_str; ++i) - str_arr->str[i] = parcel_r_string(p); - - if (p->malformed) { - parcel_free_str_array(str_arr); - return NULL; - } - - return str_arr; -} - -void parcel_free_str_array(struct parcel_str_array *str_arr) -{ - if (str_arr) { - int i; - for (i = 0; i < str_arr->num_str; ++i) - g_free(str_arr->str[i]); - g_free(str_arr); - } -} - char **parcel_r_strv(struct parcel *p) { int i; diff --git a/gril/parcel.h b/gril/parcel.h index 623dcc6c..e5592ae1 100644 --- a/gril/parcel.h +++ b/gril/parcel.h @@ -32,11 +32,6 @@ struct parcel { int malformed; }; -struct parcel_str_array { - int num_str; - char *str[]; -}; - void parcel_init(struct parcel *p); void parcel_grow(struct parcel *p, size_t size); void parcel_free(struct parcel *p); @@ -48,8 +43,6 @@ void parcel_skip_string(struct parcel *p); int parcel_w_raw(struct parcel *p, const void *data, size_t len); void *parcel_r_raw(struct parcel *p, int *len); size_t parcel_data_avail(struct parcel *p); -struct parcel_str_array *parcel_r_str_array(struct parcel *p); -void parcel_free_str_array(struct parcel_str_array *str_arr); char **parcel_r_strv(struct parcel *p); #endif |