Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Removing string constants from assertions

From: Evan Huus <eapache@xxxxxxxxx>
Date: Tue, 4 Sep 2012 16:39:43 -0400
Hi all,

I've noticed in several places the pattern of adding a message to
assertions in the form of a string constant:

g_assert(condition && "explanation");

This seems dangerous to me, primarily because if anyone ever mistypes
the && as a || then the assertion becomes dead code - it will always
pass. Also (though less important):
- it doesn't really add any benefit over simply putting the message in
a comment - a developer will have to open up the code anyways to
figure out what the problem is
- it bloats the size of the binary with a couple of unnecessary string constants

Barring any objections I will convert all such assertion messages to
regular comments.

Cheers,
Evan