summaryrefslogtreecommitdiff
path: root/source3/lib/util_getent.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-10-18 03:24:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:02 -0500
commit8d7c88667190fe286971ac4fffb64ee5bd9eeeb0 (patch)
treed5b2f0850d63a07e051c03a7abe1f10884598161 /source3/lib/util_getent.c
parentafca439d19e3d9e67b127d7060df630e2218bcb2 (diff)
downloadsamba-8d7c88667190fe286971ac4fffb64ee5bd9eeeb0.tar.gz
samba-8d7c88667190fe286971ac4fffb64ee5bd9eeeb0.tar.bz2
samba-8d7c88667190fe286971ac4fffb64ee5bd9eeeb0.zip
r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box. Jeremy. (This used to be commit d720867a788c735e56d53d63265255830ec21208)
Diffstat (limited to 'source3/lib/util_getent.c')
-rw-r--r--source3/lib/util_getent.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/source3/lib/util_getent.c b/source3/lib/util_getent.c
index 1b01cae5fa..475b0da87b 100644
--- a/source3/lib/util_getent.c
+++ b/source3/lib/util_getent.c
@@ -304,48 +304,3 @@ void free_userlist(struct sys_userlist *list_head)
SAFE_FREE(old_head);
}
}
-
-/****************************************************************
-****************************************************************/
-
-static int int_compare( int *a, int *b )
-{
- if ( *a == *b )
- return 0;
- else if ( *a < *b )
- return -1;
- else
- return 1;
-}
-
-void remove_duplicate_gids( int *num_groups, gid_t *groups )
-{
- int i;
- int count = *num_groups;
-
- if ( *num_groups <= 0 || !groups )
- return;
-
-
- DEBUG(8,("remove_duplicate_gids: Enter %d gids\n", *num_groups));
-
- qsort( groups, *num_groups, sizeof(gid_t), QSORT_CAST int_compare );
-
- for ( i=1; i<count; ) {
- if ( groups[i-1] == groups[i] ) {
- memmove( &groups[i-1], &groups[i], (count - i + 1)*sizeof(gid_t) );
-
- /* decrement the total number of groups and do not increment
- the loop counter */
- count--;
- continue;
- }
- i++;
- }
-
- *num_groups = count;
-
- DEBUG(8,("remove_duplicate_gids: Exit %d gids\n", *num_groups));
-
- return;
-}