1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#include <protocol.h> static Hashmap *hash; int ssinit() { if (hash == NULL) { hash = Hashmap_create(NULL, NULL); check(hash != NULL, "unable to create hashmap"); } return 0; error: return -1; } int sscreate(char *key) { check(ssinit() == 0, "ssinit failed"); return 0; error: return -1; }