#include "bus-error.h"
#include "bus-message.h"
#include "event-util.h"
+#include "locale-util.h"
enum {
/* We don't list LC_ALL here on purpose. People should be
FILE *f;
char line[LINE_MAX];
bool in_section = false;
+ int r;
context_free_x11(c);
if (in_section && first_word(l, "Option")) {
char **a;
- a = strv_split_quoted(l);
- if (!a) {
+ r = strv_split_quoted(&a, l);
+ if (r < 0) {
fclose(f);
- return -ENOMEM;
+ return r;
}
if (strv_length(a) == 3) {
} else if (!in_section && first_word(l, "Section")) {
char **a;
- a = strv_split_quoted(l);
- if (!a) {
+ r = strv_split_quoted(&a, l);
+ if (r < 0) {
fclose(f);
return -ENOMEM;
}
for (;;) {
char line[LINE_MAX];
char *l, **b;
+ int r;
errno = 0;
if (!fgets(line, sizeof(line), f)) {
if (l[0] == 0 || l[0] == '#')
continue;
- b = strv_split_quoted(l);
- if (!b)
- return -ENOMEM;
+ r = strv_split_quoted(&b, l);
+ if (r < 0)
+ return r;
if (strv_length(b) < 5) {
log_error("Invalid line "SYSTEMD_KBD_MODEL_MAP":%u, ignoring.", *n);
k = strlen(names[p]);
if (startswith(*i, names[p]) &&
(*i)[k] == '=' &&
- string_is_safe((*i) + k + 1)) {
+ locale_is_valid((*i) + k + 1)) {
valid = true;
passed[p] = true;