Skip to content

Commit

Permalink
conditionally include intptr_t
Browse files Browse the repository at this point in the history
  • Loading branch information
frobware committed Dec 24, 2009
1 parent 7cb5bab commit b1c72a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions hashtbl.c
Expand Up @@ -43,7 +43,7 @@
#include <stddef.h>
#include <stdlib.h> /* size_t, offsetof, NULL */
#include <string.h> /* strcmp */
#if 0
#if defined(linux)
#include <inttypes.h> /* intptr_t */
#endif
#include <assert.h>
Expand Down Expand Up @@ -514,7 +514,7 @@ int hashtbl_string_equals(const void *a, const void *b)

unsigned int hashtbl_int_hash(const void *k)
{
return hash_helper(*(const unsigned int *)k);
return hash_helper(*(unsigned int *)k);
}

int hashtbl_int_equals(const void *a, const void *b)
Expand All @@ -539,9 +539,8 @@ int hashtbl_load_factor(const struct hashtbl *h)

void hashtbl_iter_init(struct hashtbl *h, struct hashtbl_iter *iter)
{
struct dllist *node = h->all_entries.next;
iter->private = node;
iter->key = iter->val = NULL;
iter->private = h->all_entries.next;
}

int hashtbl_iter_next(struct hashtbl *h, struct hashtbl_iter *iter)
Expand Down
3 changes: 0 additions & 3 deletions hashtbl_test.c
Expand Up @@ -28,9 +28,6 @@
/* hashtbl_test.c - unit tests for hashtbl */

#include <stdlib.h>
#if 0
#include <inttypes.h>
#endif
#include <string.h>
#include <assert.h>
#include "CUnitTest.h"
Expand Down

0 comments on commit b1c72a8

Please sign in to comment.