From 818e56cf2723843377d2881a6b81b8adc0fe9160 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 10 Jan 2006 23:27:05 +0000 Subject: [ospfd] fix undefined effect expression 2006-01-10 Juris Kalnins * ospf_packet.c: (ospf_make_md5_digest) fix odd, if not undefined effect, assignment of an increment expression. --- ospfd/ospf_packet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ospfd/ospf_packet.c') diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index eb97ddbf..54b30ca7 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -339,7 +339,11 @@ ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op) /* We do this here so when we dup a packet, we don't have to waste CPU rewriting other headers. */ t = (time(NULL) & 0xFFFFFFFF); - oi->crypt_seqnum = ( t > oi->crypt_seqnum ? t : oi->crypt_seqnum++); + if (t > oi->crypt_seqnum) + oi->crypt_seqnum = t; + else + oi->crypt_seqnum++; + ospfh->u.crypt.crypt_seqnum = htonl (oi->crypt_seqnum); /* Get MD5 Authentication key from auth_key list. */ -- cgit v1.2.1