2018-03-25 10:07:39 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
2018-03-12 18:01:40 +01:00
|
|
|
#include "mlist.h"
|
|
|
|
|
|
|
|
struct mlistelem * mlist_replace(mlist_t list, void *data)
|
|
|
|
{
|
|
|
|
struct mlistelem *e;
|
|
|
|
|
|
|
|
e = mlist_get(list,data);
|
|
|
|
if (e == NULL)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
memcpy(mlistelem_dataptr(e), data,list->data_size);
|
|
|
|
return e;
|
|
|
|
|
2018-03-25 10:07:39 +02:00
|
|
|
}
|