From: David Lawrence Ramsey Date: Sat, 28 May 2005 23:32:45 +0000 (+0000) Subject: cosmetic fixes X-Git-Tag: v1.3.8~240 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1a1ea3d42fb2117b6e66e80b10ca461e0cf809dd;p=nano.git cosmetic fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/files.c b/src/files.c index 6bb4b4bf..09daf682 100644 --- a/src/files.c +++ b/src/files.c @@ -1571,6 +1571,7 @@ int write_file(const char *name, bool tmp, int append, bool } f = fdopen(fd, (append == 1) ? "ab" : "wb"); + if (f == NULL) { statusbar(_("Error writing %s: %s"), realname, strerror(errno)); close(fd); @@ -1582,8 +1583,7 @@ int write_file(const char *name, bool tmp, int append, bool assert(fileage != NULL && filebot != NULL); while (fileptr != filebot) { - size_t data_len = strlen(fileptr->data); - size_t size; + size_t data_len = strlen(fileptr->data), size; /* Newlines to nulls, just before we write to disk. */ sunder(fileptr->data);