Skip to content
Snippets Groups Projects
Commit 215cf8d8 authored by ivan.fedorov's avatar ivan.fedorov
Browse files

some more const

parent f576fe88
No related branches found
No related tags found
1 merge request!40bugs-3749
...@@ -108,7 +108,7 @@ char *dap_itoa128(char *a_str, int128_t a_value, int a_base); ...@@ -108,7 +108,7 @@ char *dap_itoa128(char *a_str, int128_t a_value, int a_base);
#ifdef HAVE_STRNDUP #ifdef HAVE_STRNDUP
#define strndup(s, l) _strndup(s, l) #define strndup(s, l) _strndup(s, l)
#endif #endif
char *_strndup(char *str, unsigned long len); char *_strndup(const char *str, unsigned long len);
#endif #endif
#define DAP_USEC_PER_SEC 1000000 #define DAP_USEC_PER_SEC 1000000
......
...@@ -855,7 +855,7 @@ char *strptime( char *buff, const char *fmt, struct tm *tm ) { ...@@ -855,7 +855,7 @@ char *strptime( char *buff, const char *fmt, struct tm *tm ) {
return buff + len; return buff + len;
} }
char *_strndup(char *str, unsigned long len) { char *_strndup(const char *str, unsigned long len) {
char *buf = (char*)memchr(str, '\0', len); char *buf = (char*)memchr(str, '\0', len);
if (buf) if (buf)
len = buf - str; len = buf - str;
......
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