daemon: switch from read_file to read_whole_file

Since we have already an helper to read a file, use it instead of the
gnulib function.
This commit is contained in:
Pino Toscano
2019-09-23 16:50:34 +02:00
parent 73a58394a9
commit b87e20ccf1
2 changed files with 2 additions and 6 deletions

View File

@@ -26,8 +26,6 @@
#include <errno.h>
#include <error.h>
#include "read-file.h"
#include "daemon.h"
#include "actions.h"
#include "optgroups.h"
@@ -39,7 +37,7 @@ read_error_file (char *error_file)
size_t len;
char *str;
str = read_file (error_file, &len);
str = read_whole_file (error_file, &len);
if (str == NULL) {
str = strdup ("(no error)");
if (str == NULL)

View File

@@ -28,8 +28,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "read-file.h"
#include "guestfs_protocol.h"
#include "daemon.h"
#include "actions.h"
@@ -107,7 +105,7 @@ read_error_file (char *error_file)
size_t len;
char *str;
str = read_file (error_file, &len);
str = read_whole_file (error_file, &len);
if (str == NULL) {
str = strdup ("(no error)");
if (str == NULL)