[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh/sbr m_mktemp.c
From: |
Earl Hood |
Subject: |
[Nmh-commits] nmh/sbr m_mktemp.c |
Date: |
Sat, 06 Feb 2010 07:45:47 +0000 |
CVSROOT: /cvsroot/nmh
Module name: nmh
Changes by: Earl Hood <ehood> 10/02/06 07:45:47
Modified files:
sbr : m_mktemp.c
Log message:
Fixed variable declaration so older compilers will not complain.
I.e. Older compilers may not support C99, so variables must be
declared at the beginning of a block.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/m_mktemp.c?cvsroot=nmh&r1=1.1&r2=1.2
Patches:
Index: m_mktemp.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/m_mktemp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- m_mktemp.c 4 Feb 2010 01:39:21 -0000 1.1
+++ m_mktemp.c 6 Feb 2010 07:45:47 -0000 1.2
@@ -1,7 +1,7 @@
/*
* m_mktemp.c -- Construct a temporary file.
*
- * $Id: m_mktemp.c,v 1.1 2010/02/04 01:39:21 ehood Exp $
+ * $Id: m_mktemp.c,v 1.2 2010/02/06 07:45:47 ehood Exp $
*
* This code is Copyright (c) 2010, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
@@ -109,6 +109,7 @@
{
static char buffer[BUFSIZ];
char *cp;
+ int n;
if (dir_in == NULL) {
if (pfx_in == NULL) {
@@ -122,7 +123,7 @@
/* No directory component */
return m_mktemp(pfx_in, fd_ret, fp_ret);
}
- int n = (int)(cp-dir_in-1); /* Length of dir component */
+ n = (int)(cp-dir_in-1); /* Length of dir component */
snprintf(buffer, sizeof(buffer), "%.*s%s", n, dir_in, pfx_in);
return m_mktemp(buffer, fd_ret, fp_ret);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] nmh/sbr m_mktemp.c,
Earl Hood <=