mmc: sdio: Fix strlcpy usage

Fixes the following clang warning:

../drivers/mmc/core/sdio_cis.c:58:31: warning: size argument in
'strlcpy' call appears to be size of the source; expected the size of
the destination [-Wstrlcpy-strlcat-size]

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: khusika <khusikadhamar@gmail.com>
Change-Id: I1b35b56039e03fb3bf6572037fa2421302c6fe32
fourteen
Nathan Chancellor 6 years ago committed by Simon1511
parent ca59796189
commit 3ad8b54cb0
  1. 2
      drivers/mmc/core/sdio_cis.c

@ -55,7 +55,7 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
for (i = 0; i < nr_strings; i++) {
buffer[i] = string;
strlcpy(string, buf, strlen(buf) + 1);
memcpy(string, buf, strlen(buf) + 1);
string += strlen(string) + 1;
buf += strlen(buf) + 1;
}

Loading…
Cancel
Save