Commits

Bill Garrison committed 976271c

Fixed clang warnings about use of variable assigned within conditional.

Comments (0)

Files changed (2)

 	if (strlen(path) == 0 || path[0] == '/')
 		return 0;
 	
-	while (component = xar_path_nextcomponent(&path_walker)) {
+	while ((component = xar_path_nextcomponent(&path_walker))) {
 		
 		if (strlen(component) == 0 || strcmp(component, ".") == 0) { // Since // is legal, and '.' is legal it's possible to have empty path elements. Ignore them
 			free(component);
 			stack_push(s_new, (void *)last_added);
 			stack_push(s_old, (void *)last_copied);
 		}
-	} while (f = xar_file_next(iter));
+	} while ((f = xar_file_next(iter)));
 		
 	loopIter = xar_iter_new();
 	for (current_xar_file = xar_file_first(new_xar, loopIter); current_xar_file; current_xar_file = xar_file_next(loopIter))