assorted fixes for bugs found with randomconfig
diff --git a/shell/hush.c b/shell/hush.c
index 7bc3b9a..c3640ed 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2795,8 +2795,8 @@
}
debug_printf("\nrunning script '%s'\n", argv[optind]);
- global_argv = argv+optind;
- global_argc = argc-optind;
+ global_argv = argv + optind;
+ global_argc = argc - optind;
input = xfopen(argv[optind], "r");
opt = parse_file_outer(input);
@@ -2809,8 +2809,8 @@
for (cur = top_vars; cur; cur = tmp) {
tmp = cur->next;
if (!cur->flg_read_only) {
- free(cur->name);
- free(cur->value);
+ free((char*)cur->name);
+ free((char*)cur->value);
free(cur);
}
}