From: David Gibson Date: Tue, 18 Aug 2015 23:17:02 +0000 (-0700) Subject: bytestring: Add rational comment to testcase X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=088030222124fc906364f30dcdc945191ecd61e7 bytestring: Add rational comment to testcase Reviewing the previous patch it took me some time to work out what the purpose of the compile_fail-BYTESTRING-2.c test. Add a comment to avoid that in future. Signed-off-by: David Gibson --- diff --git a/ccan/bytestring/test/compile_fail-BYTESTRING-2.c b/ccan/bytestring/test/compile_fail-BYTESTRING-2.c index 87dd7c7d..d4a610e2 100644 --- a/ccan/bytestring/test/compile_fail-BYTESTRING-2.c +++ b/ccan/bytestring/test/compile_fail-BYTESTRING-2.c @@ -4,6 +4,12 @@ #include +/* + * BYTESTRING() can only be used safely on a literal string (or, + * strictly, something whose size can be determined with ARRAY_SIZE(). + * This checks that it correctly fails to compile if used on a + * non-array pointer. + */ int main(int argc, char *argv[]) { struct bytestring bs;