projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
044aa4f
)
Make sure time is valid for uptime (bug 1214)
author
James Golovich
<james@gnuinter.net>
Sun, 14 Mar 2004 09:11:32 +0000
(09:11 +0000)
committer
James Golovich
<james@gnuinter.net>
Sun, 14 Mar 2004 09:11:32 +0000
(09:11 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2417
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
cli.c
patch
|
blob
|
history
diff --git
a/cli.c
b/cli.c
index
c80d29e
..
0068f12
100755
(executable)
--- a/
cli.c
+++ b/
cli.c
@@
-186,6
+186,8
@@
static char *format_uptimestr(time_t timeval)
#define WEEK (DAY*7)
#define YEAR (DAY*365)
+ if (timeval < 0)
+ return NULL;
if (timeval > YEAR) {
years = (timeval / YEAR);
timeval -= (years * YEAR);