Commit 1aae9056 authored by Colin Ian King's avatar Colin Ian King Committed by Andrew Morton

lib/oid_registry.c: remove redundant assignment to variable num

The variable num is being assigned a value that is never read, it is being
re-assigned a new value in both paths if an if-statement.  The assignment
is redundant and can be removed.

Cleans up clang scan build warning:
lib/oid_registry.c:149:3: warning: Value stored to 'num' is
never read [deadcode.DeadStores]

Link: https://lkml.kernel.org/r/20221017214556.863357-1-colin.i.king@gmail.comSigned-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 8603b6f5
......@@ -146,7 +146,6 @@ int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize)
bufsize -= count;
while (v < end) {
num = 0;
n = *v++;
if (!(n & 0x80)) {
num = n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment