view ifndef_wrapper.sh @ 1529:66a1a2547133 fuzz

The fuzzer has managed to generated DSS key/signature pairs that verify. Avoid false positives from bogus keys that wouldn't be used
author Matt Johnston <matt@ucc.asn.au>
date Wed, 21 Feb 2018 21:49:24 +0800
parents 750ec4ec4cbe
children 198e2ee0f4b1
line wrap: on
line source

#!/bin/sh

# Wrap all "#define X Y" with a #ifndef X...#endif"

sed -E 's/^(#define ([^ ]+) .*)/#ifndef \2\
\1\
#endif/'