Author: tjansen Date: Tue Oct 27 15:07:01 2009 New Revision: 1320 Log: Removed unused HIPL-specific function findkeyfiles. This coincidentally fixes warning: util.c: In function ‘findkeyfiles’: util.c:890: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result Modified: trunk/libpisa/util.c Modified: trunk/libpisa/util.c ============================================================================== --- trunk/libpisa/util.c Tue Oct 27 15:02:38 2009 (r1319) +++ trunk/libpisa/util.c Tue Oct 27 15:07:01 2009 (r1320) @@ -872,50 +872,6 @@ } } -/* - * Finds HIP key files from the directory specified by 'path'. - * Stores the file names into linked list (type listelement). - */ -void findkeyfiles(char *path, Pisa_List *files) { - - struct dirent *entry; - struct stat file_status; - DIR *dir = opendir(path); - - if (!dir) { - perror("opendir failure"); - exit(1); - } - - chdir(path); - - //Loop through all files and directories - while ( (entry = readdir(dir)) != NULL) { - if ((strcmp(entry->d_name, ".") != 0) && - (strcmp(entry->d_name, "..") != 0)) { - //Get the status info for the current file - if (stat(entry->d_name, &file_status) == 0) { - //Is this a directory, or a file? - //Go through all public key files - if (!S_ISDIR(file_status.st_mode) && - findsubstring(entry->d_name, ".pub") && - //!findsubstring(entry->d_name, ".pub") && original - findsubstring(entry->d_name, "hip_host_")) { -/* PISA_DEBUG("findkeyfiles: Public key file: %s \n",entry->d_name);*/ - insert(files, entry->d_name); - - } - } - } - } - - if (closedir(dir) == -1) { - perror("closedir failure"); - exit(1); - } -} - - char *getitem(Pisa_List *ilist, int n) { Pisa_Listitem *ptr; int count = 0;