file
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4132
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
+2007-07-11 David Lawrence Ramsey <pooka109@gmail.com>
+
+ * files.c (copy_file): Assert that inn and out don't both point
+ to the same file.
+
2007-07-10 David Lawrence Ramsey <pooka109@gmail.com>
* chars.c (nstrcasestr, mbstrcasestr, revstrstr, revstrcasestr,
* on write error. */
int copy_file(FILE *inn, FILE *out)
{
+ int retval = 0;
char buf[BUFSIZ];
size_t charsread;
- int retval = 0;
- assert(inn != NULL && out != NULL);
+ assert(inn != NULL && out != NULL && inn != out);
do {
charsread = fread(buf, sizeof(char), BUFSIZ, inn);