*: hopefully all setup_common_bufsiz() are in place
[oweals/busybox.git] / coreutils / sum.c
index cc6677221a2068f20416b2144a90e4d291d2a8da..ec9ed2a1110eaad2ea9f4e9cfaf5765223d5ae80 100644 (file)
@@ -31,12 +31,14 @@ enum { SUM_BSD, PRINT_NAME, SUM_SYSV };
 /* Return 1 if successful.  */
 static unsigned sum_file(const char *file, unsigned type)
 {
-#define buf bb_common_bufsiz1
        unsigned long long total_bytes = 0;
        int fd, r;
        /* The sum of all the input bytes, modulo (UINT_MAX + 1).  */
        unsigned s = 0;
 
+#define buf bb_common_bufsiz1
+       setup_common_bufsiz();
+
        fd = open_or_warn_stdin(file);
        if (fd == -1)
                return 0;