projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
25e6437
)
fix const related compile error with newer gcc
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 10 Apr 2009 23:16:02 +0000
(
01:16
+0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 10 Apr 2009 23:16:02 +0000
(
01:16
+0200)
ucimap.c
patch
|
blob
|
history
diff --git
a/ucimap.c
b/ucimap.c
index 9306036fc540472f749f8e09f5932a0f938b4578..dddbafc92d410cbca6f5fab0cec2051dd8258d47 100644
(file)
--- a/
ucimap.c
+++ b/
ucimap.c
@@
-255,6
+255,7
@@
ucimap_parse_section(struct uci_map *map, struct uci_sectmap *sm, struct uci_sec
{
struct uci_sectmap_data *sd = NULL;
void *section = NULL;
{
struct uci_sectmap_data *sd = NULL;
void *section = NULL;
+ char *section_name;
int err;
sd = malloc(sm->alloc_len + sizeof(struct uci_sectmap_data));
int err;
sd = malloc(sm->alloc_len + sizeof(struct uci_sectmap_data));
@@
-270,16
+271,18
@@
ucimap_parse_section(struct uci_map *map, struct uci_sectmap *sm, struct uci_sec
if (!sd->allocmap)
goto error_mem;
if (!sd->allocmap)
goto error_mem;
- s
d->s
ection_name = strdup(s->e.name);
- if (!s
d->s
ection_name)
+ section_name = strdup(s->e.name);
+ if (!section_name)
goto error_mem;
goto error_mem;
+ sd->section_name = section_name;
+
sd->cmap = malloc(BITFIELD_SIZE(sm->n_options));
if (!sd->cmap)
goto error_mem;
memset(sd->cmap, 0, BITFIELD_SIZE(sm->n_options));
sd->cmap = malloc(BITFIELD_SIZE(sm->n_options));
if (!sd->cmap)
goto error_mem;
memset(sd->cmap, 0, BITFIELD_SIZE(sm->n_options));
- ucimap_add_alloc(&sd->allocmap[sd->allocmap_len++], (void *)s
d->s
ection_name);
+ ucimap_add_alloc(&sd->allocmap[sd->allocmap_len++], (void *)section_name);
ucimap_add_alloc(&sd->allocmap[sd->allocmap_len++], (void *)sd->cmap);
section = (char *)sd + sizeof(struct uci_sectmap_data);
ucimap_add_alloc(&sd->allocmap[sd->allocmap_len++], (void *)sd->cmap);
section = (char *)sd + sizeof(struct uci_sectmap_data);