Skip to content
Snippets Groups Projects
Commit d2733a02 authored by David Gow's avatar David Gow Committed by Shuah Khan
Browse files

lib/cmdline: Fix an invalid format specifier in an assertion msg


The correct format specifier for p - n (both p and n are pointers) is
%td, as the type should be ptrdiff_t.

This was discovered by annotating KUnit assertion macros with gcc's
printf specifier, but note that gcc incorrectly suggested a %d or %ld
specifier (depending on the pointer size of the architecture being
built).

Fixes: 0ea09083 ("lib/cmdline: Allow get_options() to take 0 to validate the input")
Signed-off-by: default avatarDavid Gow <davidgow@google.com>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarDaniel Latypov <dlatypov@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 6f2f793f
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment