diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -10,14 +10,14 @@ #include "util.h" -char* copy_buf(char *buf,int len){ +char* copy_buf(const char *buf,int len){ char *dst=malloc(len+1,char); memcpy(dst,buf,len); dst[len]='\0'; return dst; } -char* copy_str(char *str){ +char* copy_str(const char *str){ return copy_buf(str,strlen(str)); } |