[hipl-commit] [tiny] Rev 3551: Initialize pointer to the return value with NULL.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Tue, 23 Feb 2010 12:19:23 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Tue Feb 23 11:18:38 2010 +0100
Revision: 3551
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Initialize pointer to the return value with NULL.

Modified:
  M  hipd/hadb.c

=== modified file 'hipd/hadb.c'
--- hipd/hadb.c 2010-02-22 18:30:02 +0000
+++ hipd/hadb.c 2010-02-23 10:18:38 +0000
@@ -140,7 +140,7 @@
 hip_ha_t *hip_hadb_find_byhits(const hip_hit_t *hit, const hip_hit_t *hit2)
 {
     //int n = 0;
-    hip_ha_t ha, *ret;
+    hip_ha_t ha, *ret = NULL;
     memcpy(&ha.hit_our, hit, sizeof(hip_hit_t));
     memcpy(&ha.hit_peer, hit2, sizeof(hip_hit_t));
     HIP_DEBUG_HIT("HIT1", hit);

Other related posts:

  • » [hipl-commit] [tiny] Rev 3551: Initialize pointer to the return value with NULL. - Tim Just