Skip to content

Commit

Permalink
Added Spaces between comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
badagent authored Aug 24, 2017
1 parent 340100a commit 1fa983f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 05-methods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void ht_delete(ht_hash_table* ht, const char* key) {
ht_item* item = ht->items[index];
int i = 1;
while (item != NULL) {
if (item!=&HT_DELETED_ITEM) {
       if (item != &HT_DELETED_ITEM) {
if (strcmp(item->key, key) == 0) {
ht_del_item(item);
ht->items[index] = &HT_DELETED_ITEM;
Expand Down Expand Up @@ -116,7 +116,7 @@ void ht_insert(ht_hash_table* ht, const char* key, const char* value) {
char* ht_search(ht_hash_table* ht, const char* key) {
// ...
while (item != NULL) {
if (item!=&HT_DELETED_ITEM) {
       if (item != &HT_DELETED_ITEM) {
if (strcmp(item->key, key) == 0) {
return item->value;
}
Expand All @@ -142,7 +142,7 @@ the new item at its location.
void ht_insert(ht_hash_table* ht, const char* key, const char* value) {
// ...
while (cur_item != NULL) {
if (cur_item!=&HT_DELETED_ITEM) {
       if (cur_item != &HT_DELETED_ITEM) {
if (strcmp(cur_item->key, key) == 0) {
ht_del_item(cur_item);
ht->items[index] = item;
Expand Down

0 comments on commit 1fa983f

Please sign in to comment.