* fish/edit.c (load_file): Change type of param from int to size_t.
(do_edit): Adjust caller.
/* guestfish edit command, suggested by Ján Ondrej, implemented by RWMJ */
static char *
/* guestfish edit command, suggested by Ján Ondrej, implemented by RWMJ */
static char *
-load_file (const char *filename, int *len_r)
+load_file (const char *filename, size_t *len_r)
{
int fd, r, start;
char *content = NULL, *p;
{
int fd, r, start;
char *content = NULL, *p;
char buf[256];
const char *editor;
char *content, *content_new;
char buf[256];
const char *editor;
char *content, *content_new;
if (argc != 1) {
fprintf (stderr, _("use '%s filename' to edit a file\n"), cmd);
if (argc != 1) {
fprintf (stderr, _("use '%s filename' to edit a file\n"), cmd);
content_new = load_file (filename, &size);
if (content_new == NULL) {
unlink (filename);
content_new = load_file (filename, &size);
if (content_new == NULL) {
unlink (filename);