--- trunk/mkinitrd-magellan/busybox/coreutils/dos2unix.c 2010/04/29 20:38:48 983 +++ trunk/mkinitrd-magellan/busybox/coreutils/dos2unix.c 2010/05/30 11:32:42 984 @@ -42,10 +42,10 @@ i = mkstemp(temp_fn); if (i == -1 || fchmod(i, st.st_mode) == -1 - || !(out = fdopen(i, "w+")) ) { bb_simple_perror_msg_and_die(temp_fn); } + out = xfdopen_for_write(i); } while ((i = fgetc(in)) != EOF) { @@ -69,7 +69,7 @@ } int dos2unix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int dos2unix_main(int argc, char **argv) +int dos2unix_main(int argc UNUSED_PARAM, char **argv) { int o, conv_type; @@ -88,11 +88,11 @@ if (o) conv_type = o; + argv += optind; do { /* might be convert(NULL) if there is no filename given */ - convert(argv[optind], conv_type); - optind++; - } while (optind < argc); + convert(*argv, conv_type); + } while (*++argv); return 0; }