From 3064ba78d8a3cfab1679b857daacc97be5094fc4 Mon Sep 17 00:00:00 2001
From: Michael Jerris <mike@jerris.com>
Date: Sun, 25 May 2008 15:15:04 +0000
Subject: [PATCH] Tue May 20 13:46:57 EDT 2008  Pekka.Pessi@nokia.com   *
 tport_logging.c: fixed klocwork issues

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8628 d0543943-73ff-0310-b7d9-9358b9ac24b2
---
 libs/sofia-sip/.update                               |  2 +-
 libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update
index 570531c85b..e18196b54d 100644
--- a/libs/sofia-sip/.update
+++ b/libs/sofia-sip/.update
@@ -1 +1 @@
-Sun May 25 11:13:45 EDT 2008
+Sun May 25 11:14:58 EDT 2008
diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
index 5c187261b8..9aace9f8bd 100644
--- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
+++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
@@ -152,13 +152,17 @@ void tport_stamp(tport_t const *self, msg_t *msg,
   char label[24] = "";
   char *comp = "";
   char name[SU_ADDRSIZE] = "";
-  su_sockaddr_t const *su = msg_addr(msg);
+  su_sockaddr_t const *su;
   unsigned short second, minute, hour;
 
+  assert(self); assert(msg);
+
   second = (unsigned short)(now.tv_sec % 60);
   minute = (unsigned short)((now.tv_sec / 60) % 60);
   hour = (unsigned short)((now.tv_sec / 3600) % 24);
 
+  su = msg_addr(msg);
+
 #if SU_HAVE_IN6
   if (su->su_family == AF_INET6) {
     if (su->su_sin6.sin6_flowinfo)
@@ -183,10 +187,13 @@ void tport_dump_iovec(tport_t const *self, msg_t *msg,
 		      size_t n, su_iovec_t const iov[], size_t iovused,
 		      char const *what, char const *how)
 {
-  tport_master_t *mr = self->tp_master;
+  tport_master_t *mr;
   char stamp[128];
   size_t i;
 
+  assert(self); assert(msg);
+
+  mr = self->tp_master;
   if (!mr->mr_dump_file)
     return;