r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
[samba.git] / source / lib / util_getent.c
index 1b01cae5fa98b8942573bc27f1bb59d77790f121..475b0da87bf0c7eed4caa7c4ccf06dbdb6b4b559 100644 (file)
@@ -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;
-}