[krbdev.mit.edu #7542] SVN Commit

Tom Yu via RT rt-comment at krbdev.mit.edu
Fri Jan 11 15:32:14 EST 2013


Avoid side effects in assert expressions

asserts may be compiled out with -DNDEBUG, so it's wrong to use an
assert expression with an important side effect.

(We also have scores of side-effecting asserts in test programs, but
those are less important and can be dealt with separately.)

(cherry picked from commit 221cd4a23691601a14500bc00146c265b50bdc94)

https://github.com/krb5/krb5/commit/4a5475fe5969a529e4bc9892dc2f7e17c0b6d685
Author: Greg Hudson <ghudson at mit.edu>
Committer: Tom Yu <tlyu at mit.edu>
Commit: 4a5475fe5969a529e4bc9892dc2f7e17c0b6d685
Branch: krb5-1.10
 src/lib/apputils/net-server.c |    5 ++++-
 src/lib/crypto/krb/cf2.c      |    3 ++-
 src/util/et/com_err.c         |   12 ++++++++----
 3 files changed, 14 insertions(+), 6 deletions(-)



More information about the krb5-bugs mailing list