aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/network/packet.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-02-28 14:04:36 +0000
committerMartin Willi <martin@strongswan.org>2007-02-28 14:04:36 +0000
commitc60c7694d2d8925c5d93ff33d132f561ad89e071 (patch)
tree9c7957b0749139c5e7c9b008c927e79d69f8e500 /src/charon/network/packet.c
parenta7a5e834e318d0582b6db979b63a5739c0a8244f (diff)
downloadstrongswan-c60c7694d2d8925c5d93ff33d132f561ad89e071.tar.bz2
strongswan-c60c7694d2d8925c5d93ff33d132f561ad89e071.tar.xz
merged tasking branch into trunk
Diffstat (limited to 'src/charon/network/packet.c')
-rw-r--r--src/charon/network/packet.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/charon/network/packet.c b/src/charon/network/packet.c
index ca8b2a616..f2fa91569 100644
--- a/src/charon/network/packet.c
+++ b/src/charon/network/packet.c
@@ -58,10 +58,7 @@ struct private_packet_t {
*/
static void set_source(private_packet_t *this, host_t *source)
{
- if (this->source)
- {
- this->source->destroy(this->source);
- }
+ DESTROY_IF(this->source);
this->source = source;
}
@@ -70,10 +67,7 @@ static void set_source(private_packet_t *this, host_t *source)
*/
static void set_destination(private_packet_t *this, host_t *destination)
{
- if (this->destination)
- {
- this->destination->destroy(this->destination);
- }
+ DESTROY_IF(this->destination);
this->destination = destination;
}