mirror of
https://github.com/javalsai/lidm.git
synced 2025-09-03 11:48:00 +02:00
fix: strlcpy usage & changes
This commit is contained in:
@@ -126,7 +126,7 @@ struct parser_error parse_key(enum introspection_type typ, union typ_ptr at,
|
||||
aux_str = strdup(key);
|
||||
if (!aux_str) FAIL("allocation failure");
|
||||
aux_err = parse_str_inplace(aux_str);
|
||||
if (aux_err.msg != NULL) {
|
||||
if (!aux_err.msg) {
|
||||
free(aux_str);
|
||||
return aux_err;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ struct parser_error parse_key(enum introspection_type typ, union typ_ptr at,
|
||||
aux_str = strdup(key);
|
||||
if (!aux_str) FAIL("allocation failure");
|
||||
aux_err = parse_str_inplace(aux_str);
|
||||
if (aux_err.msg != NULL) {
|
||||
if (!aux_err.msg) {
|
||||
free(aux_str);
|
||||
return aux_err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user