summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorTim Prouty <tim.prouty@isilon.com>2008-10-06 17:09:48 -0700
committerTim Prouty <tim.prouty@isilon.com>2008-10-06 17:18:10 -0700
commitcde1b09d68e496f8f531336088433e9546b2864d (patch)
tree5c7f81aada5d91ce275a9ef8bb63787cd2889ad2 /source3/modules
parentf19086872ec734fff3f2119712ff24117bec4e5e (diff)
downloadsamba-cde1b09d68e496f8f531336088433e9546b2864d.tar.gz
samba-cde1b09d68e496f8f531336088433e9546b2864d.tar.bz2
samba-cde1b09d68e496f8f531336088433e9546b2864d.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
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_smb_traffic_analyzer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index ff61768495..9b4c1b3e25 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -156,6 +156,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;
@@ -170,7 +171,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;
}