diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-07-15 23:00:47 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-07-15 23:00:47 +0000 |
commit | 22b0f5d30691e94b18e152ec44ed90a23f55b266 (patch) | |
tree | 896015cada90b49858e1bf6503d9583704a56179 /cdr | |
parent | 60cd1fa57deeb80b7a564fd81194797b503d4846 (diff) |
add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cdr')
-rwxr-xr-x | cdr/cdr_csv.c | 2 | ||||
-rwxr-xr-x | cdr/cdr_tds.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index bcf20fead..2689a9fb6 100755 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -123,7 +123,7 @@ static int append_date(char *buf, struct timeval tv, size_t bufsize) t = tv.tv_sec; if (strlen(buf) > bufsize - 3) return -1; - if (!tv.tv_sec && !tv.tv_usec) { + if (ast_tvzero(tv)) { strncat(buf, ",", bufsize - strlen(buf) - 1); return 0; } diff --git a/cdr/cdr_tds.c b/cdr/cdr_tds.c index 1cdb72f68..cadb9dd62 100755 --- a/cdr/cdr_tds.c +++ b/cdr/cdr_tds.c @@ -372,7 +372,7 @@ static void get_date(char *dateField, struct timeval tv) char buf[80]; /* To make sure we have date variable if not insert null to SQL */ - if (tv.tv_sec && tv.tv_usec) + if (!ast_tvzero(tv)) { t = tv.tv_sec; localtime_r(&t, &tm); |