From 709a1033d88feb4be2702896b8fe89d86a85f728 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Tue, 7 Feb 2017 11:03:57 +0100 Subject: [PATCH] core: drop a redundant call to gpiod_line_name() We're storing the name in line_name, so reuse it. Signed-off-by: Bartosz Golaszewski --- src/lib/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core.c b/src/lib/core.c index aa8f6a8..9204210 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -730,7 +730,7 @@ struct gpiod_line * gpiod_line_find_by_name(const char *name) if (!line_name) continue; - if (strcmp(gpiod_line_name(line), name) == 0) { + if (strcmp(line_name, name) == 0) { gpiod_chip_iter_free_noclose(chip_iter); return line; } -- 2.30.2