Browse Source

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.
Rusty Russell 15 years ago
parent
commit
9d511cc5b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/ccanlint/tests/examples_compile.c

+ 1 - 1
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)