Skip to content

Commit

Permalink
CID 1565414, 1565415: COPY_INSTEAD_OF_MOVE
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 authored and maxirmx committed Nov 24, 2024
1 parent 3bd1b71 commit 42f206c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/rnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4434,7 +4434,7 @@ parse_preferences(json_object *jso, rnp::UserPrefs &prefs)
/* Preferred key server */
std::string key_server;
if (json_get_str(jso, "key server", key_server)) {
prefs.key_server = key_server;
prefs.key_server = std::move(key_server);
}
/* Do not allow extra unknown keys */
return !json_object_object_length(jso);
Expand Down Expand Up @@ -4571,7 +4571,7 @@ parse_keygen_primary(rnp_ffi_t ffi,
if (str.size() > MAX_ID_LENGTH) {
return nullptr;
}
cert.userid = str;
cert.userid = std::move(str);
}
/* Preferences */
auto obj = json_get_obj(jso, "preferences");
Expand Down

0 comments on commit 42f206c

Please sign in to comment.