Changeset 397 for trunk/src/sh_files.c
- Timestamp:
- Mar 27, 2012, 9:05:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_files.c
r395 r397 2788 2788 *reported = item->is_reported; 2789 2789 retval = 1; 2790 goto out;2791 }2790 } 2791 SH_MUTEX_UNLOCK(mutex_zfiles); 2792 2792 2793 2793 #if defined(HAVE_GLOB_H) && defined(HAVE_FNMATCH_H) 2794 SH_MUTEX_LOCK(mutex_zglob);2795 for (testPattern = (sh_globstack_t *) zAVLFirst (&cursor, zglobList);2796 testPattern;2797 testPattern = (sh_globstack_t *) zAVLNext (&cursor))2798 { 2799 if (testPattern->type == SH_LIST_FILE)2794 if (retval == 0) 2795 { 2796 SH_MUTEX_LOCK(mutex_zglob); 2797 for (testPattern = (sh_globstack_t *) zAVLFirst (&cursor, zglobList); 2798 testPattern; 2799 testPattern = (sh_globstack_t *) zAVLNext (&cursor)) 2800 2800 { 2801 if ( 0 == fnmatch(testPattern->name, name, FNM_PATHNAME|FNM_PERIOD))2801 if (testPattern->type == SH_LIST_FILE) 2802 2802 { 2803 *check_mask = testPattern->check_mask; 2804 *class = testPattern->class; 2805 retval = 1; 2806 break; 2803 if (0 == fnmatch(testPattern->name, name, 2804 FNM_PATHNAME|FNM_PERIOD)) 2805 { 2806 *check_mask = testPattern->check_mask; 2807 *class = testPattern->class; 2808 retval = 1; 2809 break; 2810 } 2811 2807 2812 } 2808 2809 2813 } 2810 } 2811 SH_MUTEX_UNLOCK(mutex_zglob); 2812 #endif 2813 out: 2814 ; /* 'label at end of compound statement' */ 2815 SH_MUTEX_UNLOCK(mutex_zfiles); 2814 SH_MUTEX_UNLOCK(mutex_zglob); 2815 } 2816 #endif 2817 2816 2818 return retval; 2817 2819 }
Note:
See TracChangeset
for help on using the changeset viewer.