diff options
author | Mukund Sivaraman <muks@banu.com> | 2008-12-01 15:01:11 +0000 |
---|---|---|
committer | Mukund Sivaraman <muks@banu.com> | 2008-12-01 15:01:11 +0000 |
commit | a257703e59163b4f38c38f549179b8e45ac68c63 (patch) | |
tree | d056783c13f4adb25c133899f5d750a2b7123a2f /src/anonymous.c | |
parent | 448c19077c195fafd244539eeb5315773261fcaf (diff) |
Reformat code to GNU coding style
This is a commit which simply ran all C source code files
through GNU indent. No other modifications were made.
Diffstat (limited to 'src/anonymous.c')
-rw-r--r-- | src/anonymous.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/src/anonymous.c b/src/anonymous.c index 488d278..dd16421 100644 --- a/src/anonymous.c +++ b/src/anonymous.c @@ -30,9 +30,9 @@ static hashmap_t anonymous_map = NULL; short int -is_anonymous_enabled(void) +is_anonymous_enabled (void) { - return (anonymous_map != NULL) ? 1 : 0; + return (anonymous_map != NULL) ? 1 : 0; } /* @@ -40,12 +40,12 @@ is_anonymous_enabled(void) * zero if the string was found, zero if it wasn't and negative upon error. */ int -anonymous_search(char *s) +anonymous_search (char *s) { - assert(s != NULL); - assert(anonymous_map != NULL); + assert (s != NULL); + assert (anonymous_map != NULL); - return hashmap_search(anonymous_map, s); + return hashmap_search (anonymous_map, s); } /* @@ -55,23 +55,25 @@ anonymous_search(char *s) * successful. */ int -anonymous_insert(char *s) +anonymous_insert (char *s) { - char data = 1; + char data = 1; - assert(s != NULL); + assert (s != NULL); - if (!anonymous_map) { - anonymous_map = hashmap_create(32); - if (!anonymous_map) - return -1; - } + if (!anonymous_map) + { + anonymous_map = hashmap_create (32); + if (!anonymous_map) + return -1; + } - if (hashmap_search(anonymous_map, s) > 0) { - /* The key was already found, so return a positive number. */ - return 0; - } + if (hashmap_search (anonymous_map, s) > 0) + { + /* The key was already found, so return a positive number. */ + return 0; + } - /* Insert the new key */ - return hashmap_insert(anonymous_map, s, &data, sizeof(data)); + /* Insert the new key */ + return hashmap_insert (anonymous_map, s, &data, sizeof (data)); } |