Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] Do not use strcpy to copy 2 char #848

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions cpp/include/raft/linalg/detail/svd.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down