X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fhmapx.c;h=aab7629d74c1df188fc9f4fd2db0c265762a4ffd;hb=e04c680aae366f5af85cd50776875fcdf3c8927a;hp=ca5900c2829c85e10b2647d552141c0a1b69e809;hpb=8d1e072157ee3c8273e328c491be3c8bf57452da;p=pspp diff --git a/src/libpspp/hmapx.c b/src/libpspp/hmapx.c index ca5900c282..aab7629d74 100644 --- a/src/libpspp/hmapx.c +++ b/src/libpspp/hmapx.c @@ -28,9 +28,9 @@ items should be freed, then it should be done by iterating through MAP's contents before destroying MAP. */ void -hmapx_destroy (struct hmapx *map) +hmapx_destroy (struct hmapx *map) { - if (map != NULL) + if (map != NULL) { if (!(hmapx_is_empty (map))) { @@ -38,7 +38,7 @@ hmapx_destroy (struct hmapx *map) for (node = hmapx_first (map); node != NULL; node = next) { next = hmapx_next (map, node); - free (node); + free (node); } } hmap_destroy (&map->hmap); @@ -62,7 +62,7 @@ hmapx_clear (struct hmapx *map) /* Allocates and returns a new hmapx_node with DATA as its data item. */ static struct hmapx_node * -make_hmapx_node (void *data) +make_hmapx_node (void *data) { struct hmapx_node *node = xmalloc (sizeof *node); node->data = data; @@ -84,7 +84,7 @@ make_hmapx_node (void *data) then the client must check for duplicates itself before inserting the new item. */ struct hmapx_node * -hmapx_insert (struct hmapx *map, void *data, size_t hash) +hmapx_insert (struct hmapx *map, void *data, size_t hash) { struct hmapx_node *node = make_hmapx_node (data); hmap_insert (&map->hmap, &node->hmap_node, hash); @@ -105,7 +105,7 @@ hmapx_insert (struct hmapx *map, void *data, size_t hash) then the client must check for duplicates itself before inserting the new node. */ struct hmapx_node * -hmapx_insert_fast (struct hmapx *map, void *data, size_t hash) +hmapx_insert_fast (struct hmapx *map, void *data, size_t hash) { struct hmapx_node *node = make_hmapx_node (data); hmap_insert_fast (&map->hmap, &node->hmap_node, hash);