Mercurial > trustbridge
view cinst/nss-secitemlist.c @ 360:c0eac5c8c245
Keep working on nssstore_win and clarify its specification
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 10 Apr 2014 20:20:02 +0200 |
parents | 6ccaf25219fd |
children | 17e1c8f37d72 |
line wrap: on
line source
#include "nss-secitemlist.h" void seciteml_push (seciteml_t **list, SECItem *item) { seciteml_t *newlelt; SECItem *newitem; newlelt = (seciteml_t *)xmalloc( sizeof(seciteml_t) ); newitem = (SECItem *)xmalloc( sizeof(SECItem) ); memcpy(newitem, item, sizeof(SECItem)); newlelt->item = newitem; newlelt->next = *list; *list = newlelt; } SECItem *seciteml_pop (seciteml_t **list) { seciteml_t *oldlelt; SECItem *item = NULL; if (*list != NULL) { oldlelt = *list; item = oldlelt->item; *list = oldlelt->next; free(oldlelt); } return(item); }