Changeset 7911
- Timestamp:
- Jul 14, 2006, 4:37:47 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadata.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadata.c
r7766 r7911 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.11 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-0 6-30 02:20:06$14 * @version $Revision: 1.116 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-07-15 02:37:47 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 127 127 if (iter->regex != NULL) { 128 128 regfree(iter->regex); 129 psFree(iter->regex); 129 130 } 130 131 } … … 918 919 psMemSetDeallocator(newIter, (psFreeFunc) metadataIteratorFree); 919 920 920 if (regex == NULL) {921 newIter->iter = psListIteratorAlloc(md->list, location, false); 922 return newIter;923 } else {921 newIter->iter = psListIteratorAlloc(md->list, location, false); 922 923 if (regex) { 924 newIter->regex = psAlloc(sizeof(regex_t)); 924 925 int regRtn = regcomp(newIter->regex,regex,0); 925 926 if (regRtn != 0) { … … 934 935 } 935 936 } 936 937 psMetadataIteratorSet(newIter, location); // XXX: do we error if no match is found?938 937 939 938 return newIter; … … 1011 1010 while (psListGetAndIncrement(iter) != NULL) { 1012 1011 if (iter->cursor != NULL && 1013 regexec(regex, ((psMetadataItem*)iter->cursor )->name, 0, NULL, 0) == 0) {1012 regexec(regex, ((psMetadataItem*)iter->cursor->data)->name, 0, NULL, 0) == 0) { 1014 1013 // this key is a match 1015 1014 break;
Note:
See TracChangeset
for help on using the changeset viewer.
