From add3d572d05951f6f5ac89044d449c4dbdc03308 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 24 Dec 2008 13:05:25 +0100 Subject: Remove unused function get_numlist() --- source3/include/proto.h | 1 - source3/lib/util.c | 51 ------------------------------------------------- 2 files changed, 52 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index b187a660b0..53ba8e2503 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1165,7 +1165,6 @@ struct user_auth_info *get_cmdline_auth_info_copy(TALLOC_CTX *mem_ctx, bool set_cmdline_auth_info_machine_account_creds(struct user_auth_info *auth_info); bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid, gid_t **gids, size_t *num_gids); -const char *get_numlist(const char *p, uint32 **num, int *count); bool file_exist_stat(const char *fname,SMB_STRUCT_STAT *sbuf); bool socket_exist(const char *fname); bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st); diff --git a/source3/lib/util.c b/source3/lib/util.c index dd23d547b5..7053fdc266 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -491,57 +491,6 @@ bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid, return True; } -/**************************************************************************** - Like atoi but gets the value up to the separator character. -****************************************************************************/ - -static const char *Atoic(const char *p, int *n, const char *c) -{ - if (!isdigit((int)*p)) { - DEBUG(5, ("Atoic: malformed number\n")); - return NULL; - } - - (*n) = atoi(p); - - while ((*p) && isdigit((int)*p)) - p++; - - if (strchr_m(c, *p) == NULL) { - DEBUG(5, ("Atoic: no separator characters (%s) not found\n", c)); - return NULL; - } - - return p; -} - -/************************************************************************* - Reads a list of numbers. - *************************************************************************/ - -const char *get_numlist(const char *p, uint32 **num, int *count) -{ - int val; - - if (num == NULL || count == NULL) - return NULL; - - (*count) = 0; - (*num ) = NULL; - - while ((p = Atoic(p, &val, ":,")) != NULL && (*p) != ':') { - *num = SMB_REALLOC_ARRAY((*num), uint32, (*count)+1); - if (!(*num)) { - return NULL; - } - (*num)[(*count)] = val; - (*count)++; - p++; - } - - return p; -} - /******************************************************************* Check if a file exists - call vfs_file_exist for samba files. ********************************************************************/ -- cgit