1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

set_dom_string(): take length as size_t; -1 means use strlen() to get size

This commit is contained in:
Jonas Fonseca 2005-12-12 17:42:26 +01:00 committed by Jonas Fonseca
parent 27116d6385
commit 5ff0849eb3

View File

@ -10,10 +10,10 @@ struct dom_string {
{ (strlength) == -1 ? sizeof(strvalue) - 1 : (strlength), (strvalue) }
static inline void
set_dom_string(struct dom_string *string, unsigned char *value, uint16_t length)
set_dom_string(struct dom_string *string, unsigned char *value, size_t length)
{
string->string = value;
string->length = length;
string->length = length == -1 ? strlen(value) : length;
}
static inline int