]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-hashmap-plain.c
test-hashmap: fix undefined behaviour on string constants
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 18 Feb 2016 23:59:27 +0000 (18:59 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Feb 2016 00:39:10 +0000 (19:39 -0500)
commitd09139e1879960bd2ed81466d2f13d6cf35d0a5b
treea324a49bbcc6bb659c7b4270865d3c726174cf18
parent06466a7f039240b4c75cd5920401a7699c263d6e
test-hashmap: fix undefined behaviour on string constants

The test was failing at -O2+ with gcc 5.3 and 6.0.
"val1" == "val1" and "val1" != "val1" are both valid.
http://stackoverflow.com/questions/4843640/why-is-a-a-in-c
src/test/test-hashmap-plain.c