From 694deda45705b320915fd2f7e5eb9806a94df6ce Mon Sep 17 00:00:00 2001 From: Mark Hoemmen Date: Tue, 27 Sep 2022 09:35:12 -0700 Subject: [PATCH] Do not use strcpy to copy 2 char Given `char src` and `char dst`, one should copy them like `dst = src`, not like `strcpy(&dst, &src)`. Fixes #847. --- cpp/include/raft/linalg/detail/svd.cuh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cpp/include/raft/linalg/detail/svd.cuh b/cpp/include/raft/linalg/detail/svd.cuh index 97200a9919..90a7ddec1f 100644 --- a/cpp/include/raft/linalg/detail/svd.cuh +++ b/cpp/include/raft/linalg/detail/svd.cuh @@ -66,15 +66,9 @@ void svdQR(const raft::handle_t& handle, char jobu = 'S'; char jobvt = 'A'; - if (!gen_left_vec) { - char new_u = 'N'; - strcpy(&jobu, &new_u); - } + if (!gen_left_vec) { jobu = 'N'; } - if (!gen_right_vec) { - char new_vt = 'N'; - strcpy(&jobvt, &new_vt); - } + if (!gen_right_vec) { jobvt = 'N'; } RAFT_CUSOLVER_TRY(cusolverDngesvd(cusolverH, jobu,