rpm2cpio: handle bz2 too; code shrink
[oweals/busybox.git] / coreutils / sort.c
index ac8fc9b2e2e5b44130b08e695c2f4b0068fc6de1..fad6d124465b27b8b6e8770a80794f5261a0a8e7 100644 (file)
@@ -293,7 +293,7 @@ int sort_main(int argc UNUSED_PARAM, char **argv)
                        "k::"; /* -k takes list */
        getopt32(argv, OPT_STR, &str_ignored, &str_ignored, &str_o, &lst_k, &str_t);
 #if ENABLE_FEATURE_SORT_BIG
-       if (option_mask32 & FLAG_o) outfile = xfopen(str_o, "w");
+       if (option_mask32 & FLAG_o) outfile = xfopen_for_write(str_o);
        if (option_mask32 & FLAG_t) {
                if (!str_t[0] || str_t[1])
                        bb_error_msg_and_die("bad -t parameter");