- Prevent compiler warning in coreutils-i18n.patch (bug #136090).
This commit is contained in:
parent
b9ce60bdb5
commit
5d298e89a7
@ -2945,8 +2945,8 @@
|
|||||||
|
|
||||||
if (have_read_stdin && fclose (stdin) == EOF)
|
if (have_read_stdin && fclose (stdin) == EOF)
|
||||||
error (EXIT_FAILURE, errno, "-");
|
error (EXIT_FAILURE, errno, "-");
|
||||||
--- coreutils-5.1.3/src/fold.c.i18n 2004-01-21 22:27:02.000000000 +0000
|
--- coreutils-5.1.3/src/fold.c 2004-02-16 15:36:40.000000000 +0000
|
||||||
+++ coreutils-5.1.3/src/fold.c 2004-02-16 15:36:40.000000000 +0000
|
+++ coreutils-5.2.1/src/fold.c 2004-10-18 22:28:41.114883456 +0100
|
||||||
@@ -23,31 +23,74 @@
|
@@ -23,31 +23,74 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -3050,8 +3050,9 @@
|
|||||||
- to stdout, with maximum line length WIDTH.
|
- to stdout, with maximum line length WIDTH.
|
||||||
- Return 0 if successful, 1 if an error occurs. */
|
- Return 0 if successful, 1 if an error occurs. */
|
||||||
-
|
-
|
||||||
static void
|
-static int
|
||||||
-fold_file (char *filename, int width)
|
-fold_file (char *filename, int width)
|
||||||
|
+static void
|
||||||
+fold_text (FILE *istream, int width, int *saved_errno)
|
+fold_text (FILE *istream, int width, int *saved_errno)
|
||||||
{
|
{
|
||||||
- FILE *istream;
|
- FILE *istream;
|
||||||
@ -3100,10 +3101,10 @@
|
|||||||
|
|
||||||
- saved_errno = errno;
|
- saved_errno = errno;
|
||||||
+ *saved_errno = errno;
|
+ *saved_errno = errno;
|
||||||
|
+
|
||||||
if (offset_out)
|
+ if (offset_out)
|
||||||
fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
||||||
|
+
|
||||||
+ free(line_out);
|
+ free(line_out);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -3278,10 +3279,10 @@
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ *saved_errno = errno;
|
+ *saved_errno = errno;
|
||||||
+
|
|
||||||
+ if (offset_out)
|
if (offset_out)
|
||||||
+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
|
||||||
+
|
|
||||||
+ free(line_out);
|
+ free(line_out);
|
||||||
+}
|
+}
|
||||||
+#endif
|
+#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user