Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/heimdal/dist/kuser From prior location, ...
details: https://anonhg.NetBSD.org/src/rev/aab26ad6f365
branches: trunk
changeset: 764277:aab26ad6f365
user: elric <elric%NetBSD.org@localhost>
date: Thu Apr 14 18:21:32 2011 +0000
description:
>From prior location, handle ctime returning NULL.
revision 1.11
date: 2010/04/02 15:25:04; author: christos; state: Exp;
make it obvious to grep that ctime is being checked.
and
revision 1.10
date: 2010/04/02 15:23:17; author: christos; state: Exp;
handle ctime returning NULL.
diffstat:
crypto/external/bsd/heimdal/dist/kuser/klist.c | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diffs (46 lines):
diff -r e1329e5637c5 -r aab26ad6f365 crypto/external/bsd/heimdal/dist/kuser/klist.c
--- a/crypto/external/bsd/heimdal/dist/kuser/klist.c Thu Apr 14 18:18:16 2011 +0000
+++ b/crypto/external/bsd/heimdal/dist/kuser/klist.c Thu Apr 14 18:21:32 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: klist.c,v 1.1.1.1 2011/04/13 18:14:39 elric Exp $ */
+/* $NetBSD: klist.c,v 1.2 2011/04/14 18:21:32 elric Exp $ */
/*
* Copyright (c) 1997-2008 Kungliga Tekniska Högskolan
@@ -41,21 +41,29 @@
#include "kcc-commands.h"
static char*
-printable_time(time_t t)
+printable_time_internal(time_t t, int x)
{
static char s[128];
- strlcpy(s, ctime(&t)+ 4, sizeof(s));
- s[15] = 0;
+ char *p;
+
+ if ((p = ctime(&t)) == NULL)
+ strlcpy(s, "?", sizeof(s));
+ else
+ strlcpy(s, p + 4, sizeof(s));
+ s[x] = 0;
return s;
}
static char*
+printable_time(time_t t)
+{
+ return printable_time_internal(t, 20);
+}
+
+static char*
printable_time_long(time_t t)
{
- static char s[128];
- strlcpy(s, ctime(&t)+ 4, sizeof(s));
- s[20] = 0;
- return s;
+ return printable_time_internal(t, 20);
}
#define COL_ISSUED NP_(" Issued","")
Home |
Main Index |
Thread Index |
Old Index