Function behaviour changed.
FossilOrigin-Name: 09a2a2413e6ddbf1b4b5350fe443c7036ad17e6e118cb9fc44da4555393a5d32
This commit is contained in:
parent
ce5a7b990d
commit
446d6308d0
@ -3,5 +3,8 @@
|
||||
|
||||
|
||||
extern uint8_t * bstr_create(uint8_t *data, uint8_t len);
|
||||
extern uint8_t * bstr_create_from_cfgstr(const char * s);
|
||||
extern uint8_t * bstr_replace( uint8_t ** dst, uint8_t * bstr);
|
||||
|
||||
|
||||
#define bstr_len(s) (*s)
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
#include "bstr.h"
|
||||
|
||||
uint8_t * bstr_replace( uint8_t ** str, uint8_t * data, int len)
|
||||
uint8_t * bstr_replace( uint8_t ** dst, uint8_t * bstr)
|
||||
{
|
||||
if (str)
|
||||
free(str);
|
||||
|
||||
*str = bstr_create(data,len);
|
||||
return *str;
|
||||
if (*dst)
|
||||
free(*dst);
|
||||
|
||||
*dst = bstr;
|
||||
return *dst;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user