]> the.earth.li Git - onak.git/blobdiff - wordlist.c
Cleanup various includes
[onak.git] / wordlist.c
index 605ec06967752a4209be7591c966d2209f6618d3..e40fe82dc080736120e7c2cb581a8f17aee0643e 100644 (file)
 
 #include <ctype.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "ll.h"
 #include "decodekey.h"
-#include "log.h"
+#include "keystructs.h"
 #include "wordlist.h"
 
 /**
@@ -97,7 +98,7 @@ struct ll *makewordlistfromkey(struct ll *wordlist,
        struct ll  *wl = NULL;
 
        uids = keyuids(key, NULL);
-       for (i = 0; uids[i] != NULL; ++i) {
+       for (i = 0; uids != NULL && uids[i] != NULL; ++i) {
                words = makewordlist(NULL, uids[i]);
                for (wl = words; wl != NULL; wl = wl->next) {
                        if (llfind(wordlist, wl->object,