summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Prouty <tim.prouty@isilon.com>2008-10-07 10:30:22 -0700
committerKarolin Seeger <kseeger@samba.org>2008-10-15 18:48:48 +0200
commited955214133c264865d2f6ca532349f0c1ea8d4b (patch)
tree63af6aab417f70b665ce4b1eee94ce3a1f7e1a53
parentfa3096b975de2c7fd747ca9f344e36c911e27a9c (diff)
downloadsamba-ed955214133c264865d2f6ca532349f0c1ea8d4b.tar.gz
samba-ed955214133c264865d2f6ca532349f0c1ea8d4b.tar.xz
samba-ed955214133c264865d2f6ca532349f0c1ea8d4b.zip
Fixed build warning "passing arg from incompatible pointer type"
The fix explicitly makes the conversion from timeval to time_t using the existing time utility functions. Compiling modules/vfs_smb_traffic_analyzer.c modules/vfs_smb_traffic_analyzer.c: In function `smb_traffic_analyzer_send_data': modules/vfs_smb_traffic_analyzer.c:173: warning: passing arg 1 of `localtime' from incompatible pointer type (cherry picked from commit 22852666ddf3e77404373042ceecb19747ae25cd)
-rw-r--r--source/modules/vfs_smb_traffic_analyzer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/modules/vfs_smb_traffic_analyzer.c b/source/modules/vfs_smb_traffic_analyzer.c
index 714df02126f..1402b7c6224 100644
--- a/source/modules/vfs_smb_traffic_analyzer.c
+++ b/source/modules/vfs_smb_traffic_analyzer.c
@@ -157,6 +157,7 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
{
struct refcounted_sock *rf_sock = NULL;
struct timeval tv;
+ time_t tv_sec;
struct tm *tm = NULL;
int seconds;
char *str = NULL;
@@ -171,7 +172,8 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
}
GetTimeOfDay(&tv);
- tm=localtime(&tv.tv_sec);
+ tv_sec = convert_timespec_to_time_t(convert_timeval_to_timespec(tv));
+ tm = localtime(&tv_sec);
if (!tm) {
return;
}