Show
Ignore:
Timestamp:
04/26/07 19:48:10 (21 months ago)
Author:
aturner
Message:

svn merge -r 1838:1839 ../../trunk .
merges r1839 to 3.0. fixes #167

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/3.0/src/common/interface.c

    r1766 r1845  
    5555     
    5656    assert(alias); 
    57     assert(list); 
    5857     
    59     ptr = list; 
     58    if (list != NULL) {         
     59        ptr = list; 
    6060     
    61     do { 
    62         /* check both the alias & name fields */ 
    63         if (strcmp(alias, ptr->alias) == 0) 
    64             return(ptr->name); 
     61        do { 
     62            /* check both the alias & name fields */ 
     63            if (strcmp(alias, ptr->alias) == 0) 
     64                return(ptr->name); 
    6565         
    66         if (strcmp(alias, ptr->name) == 0) 
    67             return(ptr->name); 
     66            if (strcmp(alias, ptr->name) == 0) 
     67                return(ptr->name); 
    6868             
    69         ptr = ptr->next; 
    70     } while (ptr != NULL); 
     69            ptr = ptr->next; 
     70        } while (ptr != NULL); 
     71    } else { 
     72        return(alias); 
     73    } 
    7174     
    7275    return(NULL);