Remove libbsd and strlcpy
This commit is contained in:
parent
3f11431df6
commit
1f315d2b92
15 changed files with 53 additions and 50 deletions
src
|
@ -1,4 +1,3 @@
|
|||
#include <bsd/string.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <logger.h>
|
||||
|
@ -343,7 +342,8 @@ router_find_endpoint(const char *uri_str, size_t uri_len, struct mg_str *method_
|
|||
{
|
||||
size_t arg_value_str_len = strlen(best_endpoint->args[i].value.v_str);
|
||||
char *arg_value_str = malloc(sizeof(char) * (arg_value_str_len + 1));
|
||||
strlcpy(arg_value_str, best_endpoint->args[i].value.v_str, arg_value_str_len + 1);
|
||||
strcpy(arg_value_str, best_endpoint->args[i].value.v_str);
|
||||
arg_value_str[arg_value_str_len] = '\0';
|
||||
best_endpoint->args[i].value.v_str = arg_value_str;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue