Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit e69da001 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Michael Bestas
Browse files

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: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarkhusika <khusikadhamar@gmail.com>
Change-Id: I1b35b56039e03fb3bf6572037fa2421302c6fe32
parent 7a9f779e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,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;
	}