You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#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;
|
|
|
|
|
|
|
|
}
|