Fixed KW Warnings based on using uninitialized values
authorErich Keane <erich.keane@intel.com>
Thu, 19 Mar 2015 22:16:31 +0000 (15:16 -0700)
committerSashi Penta <sashi.kumar.penta@intel.com>
Tue, 24 Mar 2015 17:35:11 +0000 (17:35 +0000)
commitdc8fdcbb69f8f61d883c3c1a698ca6a9b4bf24b0
tree99dc20b56037f447f9e2e77abe702491f761a8bc
parentff8a6af45c81d0722d93b1084c011270e2c414ac
Fixed KW Warnings based on using uninitialized values

The values adjusted here were improperly initialized, so these
fixes ensure that they are only used when properly initialized.

Note that in the second case, we were checking for NULL, but
dereferencing anyway.  This adds an else case to avoid that.

Change-Id: I34cb292267f6ba21d3849fa5ad06b89eca02b557
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/519
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
resource/csdk/stack/src/ocstack.c