comparison sidinfo.c @ 339:923e63b9653b

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 15:14:16 +0200
parents 7ad937740139
children 6f8c431a3040
comparison
equal deleted inserted replaced
338:b71c2dda6c6b 339:923e63b9653b
1115 } 1115 }
1116 1116
1117 1117
1118 BOOL argHandleFile(char *path) 1118 BOOL argHandleFile(char *path)
1119 { 1119 {
1120 char *pattern = NULL, *filename = NULL, *pt, *npath; 1120 char *pattern, *filename, *pt, *npath;
1121 BOOL ret; 1121 BOOL ret;
1122 1122
1123 if ((npath = th_strdup(path)) == NULL) 1123 if ((npath = th_strdup(path)) == NULL)
1124 return FALSE; 1124 return FALSE;
1125 1125
1135 npath = th_strdup("."); 1135 npath = th_strdup(".");
1136 pt = strcmp(path, npath) != 0 ? path : NULL; 1136 pt = strcmp(path, npath) != 0 ? path : NULL;
1137 } 1137 }
1138 1138
1139 // Check if we have glob pattern chars 1139 // Check if we have glob pattern chars
1140 pattern = filename = NULL;
1140 if (pt != NULL && *pt != 0) 1141 if (pt != NULL && *pt != 0)
1141 { 1142 {
1142 if (strchr(pt, '*') || strchr(pt, '?')) 1143 if (strchr(pt, '*') || strchr(pt, '?'))
1143 pattern = th_strdup(pt); 1144 pattern = th_strdup(pt);
1144 else 1145 else