/[pdpsoft]/trunk/grid-mw-security/ees/src/eval_man/pdl.c
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/src/eval_man/pdl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1409 by aramv, Wed Dec 9 14:13:11 2009 UTC revision 1410 by aramv, Thu Jan 21 13:09:13 2010 UTC
# Line 678  policy_t* remove_policy_by_name(policy_t Line 678  policy_t* remove_policy_by_name(policy_t
678  /*! converts a string to an array of strings by splitting it at each \t delimiter  /*! converts a string to an array of strings by splitting it at each \t delimiter
679    - overwrites the second argument with a pointer to the number of elements in the array */    - overwrites the second argument with a pointer to the number of elements in the array */
680  char** _var_to_argv(char* value, int *argc){  char** _var_to_argv(char* value, int *argc){
681    char *start_of_arg = NULL, *copy_of_value = NULL, **argv = NULL;    char   *start_of_arg = NULL,  *copy_of_value = NULL, **argv = NULL;
682    char *delimiters = " \t";    char   *delimiters   = " \t";
683    size_t size_of_arg = 0, size_of_array, i = 0;    size_t size_of_arg   = 0,     size_of_array,         i      = 0;
684    char *str_ptr;    char   *str_ptr;
685    
686    copy_of_value = strdup(value);    copy_of_value = strdup(value);
687    size_of_array = (sizeof(char)*(strlen(copy_of_value)+1));    size_of_array = (sizeof(char*)*(strlen(copy_of_value)+1));
688    
689    if((argv = calloc(1, size_of_array)) != NULL){    if((argv = calloc(1, size_of_array)) != NULL){
690      start_of_arg = strtok_r(copy_of_value, delimiters, &str_ptr);      start_of_arg = strtok_r(copy_of_value, delimiters, &str_ptr);
691      while(start_of_arg != NULL){      while(start_of_arg != NULL){

Legend:
Removed from v.1409  
changed lines
  Added in v.1410

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28