From: Karel Zak Date: Fri, 1 Oct 2021 11:10:46 +0000 (+0200) Subject: lsfd: use new scols_line_get_column_data() X-Git-Tag: v2.38-rc1~144^2~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8fa2c2a7653994c3c646aad9f2e11e3eb679a57;p=thirdparty%2Futil-linux.git lsfd: use new scols_line_get_column_data() Signed-off-by: Karel Zak --- diff --git a/misc-utils/lsfd-filter.c b/misc-utils/lsfd-filter.c index c509b0579f..5fa7919d32 100644 --- a/misc-utils/lsfd-filter.c +++ b/misc-utils/lsfd-filter.c @@ -935,9 +935,7 @@ static bool node_apply(struct node *node, struct parameter *params, struct libsc return VAL(node,boolean); if (!params[PINDEX(node)].has_value) { - struct libscols_cell *cell = scols_line_get_column_cell(ln, - params[PINDEX(node)].cl); - const char *data = scols_cell_get_data(cell); + const char *data = scols_line_get_column_data(ln, params[PINDEX(node)].cl); if (data == NULL) return false; params[PINDEX(node)].val.boolean = !*data ? false : @@ -1038,8 +1036,7 @@ static bool op1_check_type_bool_or_op(struct node *node) else { \ struct parameter *p = params + pindex; \ if (!p->has_value) { \ - struct libscols_cell *cell = scols_line_get_column_cell(ln, p->cl); \ - p->val.str = scols_cell_get_data(cell); \ + p->val.str = scols_line_get_column_data(ln, p->cl); \ if (p->val.str == NULL) return false; \ p->has_value = true; \ } \ @@ -1054,8 +1051,7 @@ static bool op1_check_type_bool_or_op(struct node *node) else { \ struct parameter *p = params + pindex; \ if (!p->has_value) { \ - struct libscols_cell *cell = scols_line_get_column_cell(ln, p->cl); \ - const char *tmp = scols_cell_get_data(cell); \ + const char *tmp = scols_line_get_column_data(ln, p->cl); \ if (tmp == NULL) return false; \ p->val.num = strtoull(tmp, NULL, 10); \ p->has_value = true; \