summaryrefslogtreecommitdiff
path: root/common/set.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/set.c')
-rw-r--r--common/set.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/common/set.c b/common/set.c
index aec7e83..7b3c2b0 100644
--- a/common/set.c
+++ b/common/set.c
@@ -2,7 +2,7 @@
set.c - set functions
This file is part of the nss-pam-ldapd library.
- Copyright (C) 2008, 2009, 2010 Arthur de Jong
+ Copyright (C) 2008, 2009, 2010, 2012 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -41,27 +41,27 @@ SET *set_new(void)
return (SET *)dict_new();
}
-int set_add(SET *set,const char *value)
+int set_add(SET *set, const char *value)
{
- return dict_put((DICT *)set,value,set);
+ return dict_put((DICT *)set, value, set);
}
char *set_pop(SET *set)
{
const char *key;
char *value;
- key=dict_getany((DICT *)set);
- if (key==NULL)
+ key = dict_getany((DICT *)set);
+ if (key == NULL)
return NULL; /* no more entries in set */
/* remove the entry from the dict and return a copy */
- value=strdup(key);
- dict_put((DICT *)set,key,NULL);
+ value = strdup(key);
+ dict_put((DICT *)set, key, NULL);
return value;
}
-int set_contains(SET *set,const char *value)
+int set_contains(SET *set, const char *value)
{
- return dict_get((DICT *)set,value)!=NULL;
+ return dict_get((DICT *)set, value) != NULL;
}
void set_free(SET *set)