diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
commit | 3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch) | |
tree | f87bd4a126b3a843858eb447e8fd5893c3ee3882 /contrib/ccan/json/test/common.h | |
parent | Initial commit. (diff) | |
download | knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/ccan/json/test/common.h')
-rw-r--r-- | contrib/ccan/json/test/common.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/ccan/json/test/common.h b/contrib/ccan/json/test/common.h new file mode 100644 index 0000000..328cb73 --- /dev/null +++ b/contrib/ccan/json/test/common.h @@ -0,0 +1,18 @@ +#include <ccan/json/json.c> +#include <ccan/tap/tap.h> + +#include <errno.h> +#include <string.h> + +static char *chomp(char *s) +{ + char *e; + + if (s == NULL || *s == 0) + return s; + + e = strchr(s, 0); + if (e[-1] == '\n') + *--e = 0; + return s; +} |