From 9d511cc5b12021b6c6c079fc5b08487fdf361a26 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 6 Dec 2010 12:48:18 +1030 Subject: [PATCH] ccanlint: fix usage of static funcs Out-by-one error had us using character prior to declaration, eg, in "static int *foo" we use "*foo". This seems to compile, but is weird. --- tools/ccanlint/tests/examples_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ccanlint/tests/examples_compile.c b/tools/ccanlint/tests/examples_compile.c index 7cee7795..87a6ad02 100644 --- a/tools/ccanlint/tests/examples_compile.c +++ b/tools/ccanlint/tests/examples_compile.c @@ -154,7 +154,7 @@ static char *add_func(char *others, const char *line) } return talloc_asprintf_append(others, "printf(\"%%p\", %.*s);\n", - (unsigned)(end - p + 1), p); + (unsigned)(end - p), p+1); } static void strip_leading_whitespace(char **lines) -- 2.39.2