!A || (A && B) is equivalent to the simpler !A || B
therefore it is preferable to use the second version as
it is simpler to parse while reading the code.
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20170824075547.29844-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15313.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
... | ... |
@@ -208,7 +208,7 @@ fragment_incoming(struct fragment_master *f, struct buffer *buf, |
208 | 208 |
} |
209 | 209 |
|
210 | 210 |
/* is this the first fragment for our sequence number? */ |
211 |
- if (!frag->defined || (frag->defined && frag->max_frag_size != size)) |
|
211 |
+ if (!frag->defined || frag->max_frag_size != size) |
|
212 | 212 |
{ |
213 | 213 |
frag->defined = true; |
214 | 214 |
frag->max_frag_size = size; |