mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
strdup name confusing
This commit is contained in:
parent
eb4573b06c
commit
719fcf91ab
3 changed files with 8 additions and 8 deletions
|
@ -169,7 +169,7 @@ check_script:
|
|||
// remove linebreaks
|
||||
strcleanrn(script_cmd_buf, sizeof(script_cmd_buf));
|
||||
|
||||
cmd = strdup(script_cmd_buf);
|
||||
cmd = str_dup(script_cmd_buf);
|
||||
if (cmd != NULL)
|
||||
printprompt = true;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ check_script:
|
|||
// If there is a script command
|
||||
if (execCommand) {
|
||||
|
||||
cmd = strdup(script_cmd);
|
||||
cmd = str_dup(script_cmd);
|
||||
if (cmd != NULL)
|
||||
printprompt = true;
|
||||
|
||||
|
@ -206,7 +206,7 @@ check_script:
|
|||
// remove linebreaks
|
||||
strcleanrn(script_cmd_buf, sizeof(script_cmd_buf));
|
||||
|
||||
cmd = strdup(script_cmd_buf);
|
||||
cmd = str_dup(script_cmd_buf);
|
||||
if (cmd != NULL)
|
||||
printprompt = true;
|
||||
|
||||
|
|
|
@ -919,10 +919,10 @@ void strcreplace(char *buf, size_t len, char from, char to) {
|
|||
}
|
||||
|
||||
|
||||
char *strdup(const char *src) {
|
||||
return strndup(src, strlen(src));
|
||||
char *str_dup(const char *src) {
|
||||
return str_ndup(src, strlen(src));
|
||||
}
|
||||
char *strndup(const char *src, size_t len) {
|
||||
char *str_ndup(const char *src, size_t len) {
|
||||
|
||||
char *dest = (char *) calloc(len + 1, sizeof(uint8_t));
|
||||
if (dest != NULL) {
|
||||
|
|
|
@ -99,7 +99,7 @@ bool str_endswith(const char *s, const char *suffix); // check for suffix in
|
|||
void clean_ascii(unsigned char *buf, size_t len);
|
||||
void strcleanrn(char *buf, size_t len);
|
||||
void strcreplace(char *buf, size_t len, char from, char to);
|
||||
char *strdup(const char *src);
|
||||
char *strndup(const char *src, size_t len);
|
||||
char *str_dup(const char *src);
|
||||
char *str_ndup(const char *src, size_t len);
|
||||
int hexstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue