summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/targ.c
diff options
context:
space:
mode:
authorhoek <hoek@FreeBSD.org>1999-08-17 00:39:26 +0000
committerhoek <hoek@FreeBSD.org>1999-08-17 00:39:26 +0000
commit5d62bbe5a50f3c7ebe77803935bb73d1b6470757 (patch)
treec22ea5a1bb41e5c36b9b7c6a2f05399b0e89a84b /usr.bin/make/targ.c
parent33f15d9b593b0367efcf31b8b6b795c36746c989 (diff)
downloadFreeBSD-src-5d62bbe5a50f3c7ebe77803935bb73d1b6470757.zip
FreeBSD-src-5d62bbe5a50f3c7ebe77803935bb73d1b6470757.tar.gz
Merge style- and trivial- only changes from OpenBSD (dated 1999/07/29-19:55+1).
Obtained from: OpenBSD, sometimes indirected from NetBSD; myself
Diffstat (limited to 'usr.bin/make/targ.c')
-rw-r--r--usr.bin/make/targ.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index 3fdc65b..21aaa64 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -35,11 +35,16 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: targ.c,v 1.7 1997/02/22 19:27:24 peter Exp $
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
+#else
+static const char rcsid[] =
+ "$Id";
+#endif
#endif /* not lint */
/*-
@@ -210,8 +215,7 @@ TargFreeGN (gnp)
free(gn->name);
- if (gn->path)
- free(gn->path);
+ efree(gn->path);
Lst_Destroy(gn->iParents, NOFREE);
Lst_Destroy(gn->cohorts, NOFREE);
@@ -462,17 +466,12 @@ Targ_FmtTime (time)
time_t time;
{
struct tm *parts;
- static char buf[40];
- static char *months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- };
+ static char buf[128];
parts = localtime(&time);
- sprintf (buf, "%d:%02d:%02d %s %d, %d",
- parts->tm_hour, parts->tm_min, parts->tm_sec,
- months[parts->tm_mon], parts->tm_mday, 1900 + parts->tm_year);
+ strftime(buf, sizeof buf, "%k:%M:%S %b %d, %Y", parts);
+ buf[sizeof(buf) - 1] = '\0';
return(buf);
}
OpenPOWER on IntegriCloud