diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-29 02:36:46 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-29 02:36:46 +0000 |
commit | 8330ab3cfc6611739cf6ee83968f32c97be549d5 (patch) | |
tree | e31abbd49384b5c6a8c1d317d716bff98c5b0f1b /wk5/pset/speller | |
parent | 43691e09454a41340f3ac3ae56dcff88f8fd7390 (diff) |
Sun, Apr 28, 2024, 7:36 PM -07:00
Diffstat (limited to 'wk5/pset/speller')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index a0b9381..2accd1b 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -65,7 +65,7 @@ bool load(const char *dictionary) { // initialize the table for (int i = 0; i < N; i++) { - table[i] = NULL; + table[i] = 0; // table[i]->word = ""; } @@ -100,7 +100,7 @@ bool load(const char *dictionary) // hash the word to find the bucket it goes in int val = hash(ptr->word); // put new node at begining of bucket - if (table[val] != NULL) + if (table[val] != 0) { ptr->next = table[val]; table[val] = ptr; |