Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 5d0b9681 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

FMT

parent 53b9afa2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!177Add the query to the `update` command to filter karas to update
Pipeline #2474 réussi
......@@ -266,7 +266,8 @@ strv_equal(struct strv a, struct strv b)
static _Bool
strv_equal_nocase(struct strv a, struct strv b)
{
if (a.count != b.count) return (_Bool)0;
if (a.count != b.count)
return (_Bool)0;
for (int i = 0; i < a.count; ++i) {
if (strv_ctoupper(a.data[i]) != strv_ctoupper(b.data[i]))
return (_Bool)0;
......
......@@ -155,17 +155,20 @@ ini_parse(const char *path, lkt_db *db)
const struct strv key = strv_trim(strv_chop_left(&line, separator_index));
strv_chop_left(&line, 1); /* Skip the "=" character */
const struct strv value = strv_trim(strv_take_left_while(line, ___char_is_not_comment_delim));
const struct strv value =
strv_trim(strv_take_left_while(line, ___char_is_not_comment_delim));
/* Handle the (key, value) pair */
if (strv_len(value) == 0 || strv_len(key) == 0) {
LOG_ERROR("PARSER", "Invalid key pair at line '%d'", linenum);
LOG_ERROR_IF(strv_len(key), "PARSER", "The key was: '" STRV_FMT "'", STRV_ARG(key));
LOG_ERROR_IF(strv_len(value), "PARSER", "The value was: '"STRV_FMT"'", STRV_ARG(value));
LOG_ERROR_IF(strv_len(value), "PARSER", "The value was: '" STRV_FMT "'",
STRV_ARG(value));
}
else if (section[0]) {
LOG_DEBUG("PARSER", "Found line: [%s] '"STRV_FMT"' = '"STRV_FMT"'", section, STRV_ARG(key), STRV_ARG(value));
LOG_DEBUG("PARSER", "Found line: [%s] '" STRV_FMT "' = '" STRV_FMT "'", section,
STRV_ARG(key), STRV_ARG(value));
if (handler(db, section, key, value)) {
error = 1;
LOG_ERROR("PARSER",
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter