mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-02 01:17:52 +03:00
misc: Make the src pointer const in ssh_strreplace()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -98,5 +98,5 @@ int ssh_quote_file_name(const char *file_name, char *buf, size_t buf_len);
|
|||||||
int ssh_newline_vis(const char *string, char *buf, size_t buf_len);
|
int ssh_newline_vis(const char *string, char *buf, size_t buf_len);
|
||||||
int ssh_tmpname(char *template);
|
int ssh_tmpname(char *template);
|
||||||
|
|
||||||
char *ssh_strreplace(char *src, const char *pattern, const char *repl);
|
char *ssh_strreplace(const char *src, const char *pattern, const char *repl);
|
||||||
#endif /* MISC_H_ */
|
#endif /* MISC_H_ */
|
||||||
|
|||||||
@@ -1799,7 +1799,7 @@ err:
|
|||||||
* @returns src_replaced a pointer that points to the replaced string.
|
* @returns src_replaced a pointer that points to the replaced string.
|
||||||
* NULL if allocation fails or if src is NULL.
|
* NULL if allocation fails or if src is NULL.
|
||||||
*/
|
*/
|
||||||
char *ssh_strreplace(char *src, const char *pattern, const char *replace)
|
char *ssh_strreplace(const char *src, const char *pattern, const char *replace)
|
||||||
{
|
{
|
||||||
char *p = NULL;
|
char *p = NULL;
|
||||||
char *src_replaced = NULL;
|
char *src_replaced = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user