X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fjson%2Ftest%2Fcommon.h;fp=ccan%2Fjson%2Ftest%2Fcommon.h;h=328cb73c03d07b0c79ab0a247ff41bf24eaa15e6;hb=f4eb3a18caf946ee6cc2cb57e2a0c6a6f115157f;hp=0000000000000000000000000000000000000000;hpb=0284423676209380a2e07086b9b356096a2f93e6;p=ccan diff --git a/ccan/json/test/common.h b/ccan/json/test/common.h new file mode 100644 index 00000000..328cb73c --- /dev/null +++ b/ccan/json/test/common.h @@ -0,0 +1,18 @@ +#include +#include + +#include +#include + +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; +}