forked from github/server
fix compilation and setting parameters to null
This commit is contained in:
parent
2aafa2b54f
commit
6d0bcb246d
2 changed files with 8 additions and 5 deletions
|
@ -20,6 +20,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct unit;
|
||||||
struct faction;
|
struct faction;
|
||||||
struct attrib;
|
struct attrib;
|
||||||
extern struct attrib_type at_otherfaction;
|
extern struct attrib_type at_otherfaction;
|
||||||
|
|
|
@ -1160,11 +1160,13 @@ void set_param(struct param **p, const char *key, const char *data)
|
||||||
}
|
}
|
||||||
p = &(*p)->next;
|
p = &(*p)->next;
|
||||||
}
|
}
|
||||||
par = malloc(sizeof(param));
|
if (data) {
|
||||||
par->name = _strdup(key);
|
par = malloc(sizeof(param));
|
||||||
par->data = _strdup(data);
|
par->name = _strdup(key);
|
||||||
par->next = *p;
|
par->data = _strdup(data);
|
||||||
*p = par;
|
par->next = *p;
|
||||||
|
*p = par;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void kernel_done(void)
|
void kernel_done(void)
|
||||||
|
|
Loading…
Reference in a new issue