Skip to content
Snippets Groups Projects
Commit 921ac0e6 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

resolve discussion about param[out] and return value

parent 7961204c
No related merge requests found
......@@ -195,13 +195,14 @@ int parse_int(const char * input, int * result)
/**
* Add the SSH_COMMAND string in front of ssh_key unless it's already there
* because people have seen it being used in ssh_keys_list.
* @param[in] ssh_key a valid ssh key string
* @param[out] ssh_key_with_command the ssh_key with the command prepended
* if needed
* @param[in] ssh_key a valid ssh key string
*/
int add_ssh_command(char ** ssh_key_with_command, const char * ssh_key)
{
if(strncmp(SSH_COMMAND, ssh_key, strlen(SSH_COMMAND)) != 0)
asprintf(ssh_key_with_command, "%s %s", SSH_COMMAND, ssh_key);
return asprintf(ssh_key_with_command, "%s %s", SSH_COMMAND, ssh_key);
else
asprintf(ssh_key_with_command, "%s", ssh_key);
return 0;
return asprintf(ssh_key_with_command, "%s", ssh_key);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment