[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] read-file: add variants that clear internal memory
From: |
Bruno Haible |
Subject: |
Re: [PATCH] read-file: add variants that clear internal memory |
Date: |
Thu, 28 May 2020 22:09:59 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; ) |
> Both has been fixed and pushed. Thank you for the review!
Let me update the uses of the module 'read-file' in Gnulib.
I think the next weekly CI run would have caught this.
2020-05-28 Bruno Haible <bruno@clisp.org>
Fix build errors due to read-file changes (regression from 2020-05-27).
* lib/git-merge-changelog.c (read_changelog_file): Update read_file
invocation.
* tests/test-sameacls.c (main): Likewise.
* tests/test-pipe-filter-gi1.c (main): Call read_file instead of
read_binary_file.
* tests/test-pipe-filter-ii1.c (main): Likewise.
diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c
index 1e6dae1..7b74a49 100644
--- a/lib/git-merge-changelog.c
+++ b/lib/git-merge-changelog.c
@@ -1,5 +1,5 @@
/* git-merge-changelog - git "merge" driver for GNU style ChangeLog files.
- Copyright (C) 2008-2010 Bruno Haible <bruno@clisp.org>
+ Copyright (C) 2008-2020 Bruno Haible <bruno@clisp.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -300,7 +300,7 @@ read_changelog_file (const char *filename, struct
changelog_file *result)
/* Read the file in text mode, otherwise it's hard to recognize empty
lines. */
size_t length;
- char *contents = read_file (filename, &length);
+ char *contents = read_file (filename, 0, &length);
if (contents == NULL)
{
fprintf (stderr, "could not read file '%s'\n", filename);
diff --git a/tests/test-pipe-filter-gi1.c b/tests/test-pipe-filter-gi1.c
index 4ee9375..0994610 100644
--- a/tests/test-pipe-filter-gi1.c
+++ b/tests/test-pipe-filter-gi1.c
@@ -80,7 +80,7 @@ main (int argc, char *argv[])
/* Read some text from a file. */
input_filename = argv[2];
- input = read_binary_file (input_filename, &input_size);
+ input = read_file (input_filename, RF_BINARY, &input_size);
ASSERT (input != NULL);
/* Convert it to uppercase, line by line. */
diff --git a/tests/test-pipe-filter-ii1.c b/tests/test-pipe-filter-ii1.c
index 5f31d37..5a56c55 100644
--- a/tests/test-pipe-filter-ii1.c
+++ b/tests/test-pipe-filter-ii1.c
@@ -102,7 +102,7 @@ main (int argc, char *argv[])
/* Read some text from a file. */
input_filename = argv[2];
- input = read_binary_file (input_filename, &input_size);
+ input = read_file (input_filename, RF_BINARY, &input_size);
ASSERT (input != NULL);
/* Convert it to uppercase, line by line. */
diff --git a/tests/test-sameacls.c b/tests/test-sameacls.c
index cdb10f4..6aad92f 100644
--- a/tests/test-sameacls.c
+++ b/tests/test-sameacls.c
@@ -55,14 +55,14 @@ main (int argc, char *argv[])
size_t size2;
char *contents2;
- contents1 = read_file (file1, &size1);
+ contents1 = read_file (file1, 0, &size1);
if (contents1 == NULL)
{
fprintf (stderr, "error reading file %s: errno = %d\n", file1, errno);
fflush (stderr);
abort ();
}
- contents2 = read_file (file2, &size2);
+ contents2 = read_file (file2, 0, &size2);
if (contents2 == NULL)
{
fprintf (stderr, "error reading file %s: errno = %d\n", file2, errno);
- [PATCH] read-file: add variants that clear internal memory, Daiki Ueno, 2020/05/26
- Re: [PATCH] read-file: add variants that clear internal memory, Bruno Haible, 2020/05/26
- Re: [PATCH] read-file: add variants that clear internal memory, Daiki Ueno, 2020/05/26
- Re: [PATCH] read-file: add variants that clear internal memory, Bruno Haible, 2020/05/26
- Re: [PATCH] read-file: add variants that clear internal memory, Daiki Ueno, 2020/05/27
- Re: [PATCH] read-file: add variants that clear internal memory, Bruno Haible, 2020/05/27
- Re: [PATCH] read-file: add variants that clear internal memory, Daiki Ueno, 2020/05/27
- Re: [PATCH] read-file: add variants that clear internal memory,
Bruno Haible <=
- Re: [PATCH] read-file: add variants that clear internal memory, Daiki Ueno, 2020/05/28
- Re: [PATCH] read-file: add variants that clear internal memory, Bruno Haible, 2020/05/29
- Re: [PATCH] read-file: add variants that clear internal memory, Daiki Ueno, 2020/05/29