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" {
|
||||
#endif
|
||||
|
||||
struct unit;
|
||||
struct faction;
|
||||
struct attrib;
|
||||
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;
|
||||
}
|
||||
par = malloc(sizeof(param));
|
||||
par->name = _strdup(key);
|
||||
par->data = _strdup(data);
|
||||
par->next = *p;
|
||||
*p = par;
|
||||
if (data) {
|
||||
par = malloc(sizeof(param));
|
||||
par->name = _strdup(key);
|
||||
par->data = _strdup(data);
|
||||
par->next = *p;
|
||||
*p = par;
|
||||
}
|
||||
}
|
||||
|
||||
void kernel_done(void)
|
||||
|
|
Loading…
Reference in a new issue