diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2025-04-11 15:29:12 +0200 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2025-04-17 15:16:10 +0200 |
| commit | e7ae507c024cb78b39b6e277584b1f7e59a99b81 (patch) | |
| tree | 1651b0c4c9cac797d33b17edfd080e08617f7442 /drivers | |
| parent | 2eba6f9e6b87bfe32d944409d14cbb134b17a69a (diff) | |
s390: Remove optional third argument of strscpy() if possible
The third argument of strscpy() is optional and can be left away iff
the destination is an array and the maximum size of the copy is the
size of destination.
Remove the third argument for those cases where this is possible.
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/s390/char/diag_ftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/diag_ftp.c b/drivers/s390/char/diag_ftp.c index 711f6982438e..f41b39c9d267 100644 --- a/drivers/s390/char/diag_ftp.c +++ b/drivers/s390/char/diag_ftp.c @@ -159,7 +159,7 @@ ssize_t diag_ftp_cmd(const struct hmcdrv_ftp_cmdspec *ftp, size_t *fsize) goto out; } - len = strscpy(ldfpl->fident, ftp->fname, sizeof(ldfpl->fident)); + len = strscpy(ldfpl->fident, ftp->fname); if (len < 0) { len = -EINVAL; goto out_free; |
