core: drop a redundant call to gpiod_line_name()
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 7 Feb 2017 10:03:57 +0000 (11:03 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Tue, 7 Feb 2017 10:03:57 +0000 (11:03 +0100)
We're storing the name in line_name, so reuse it.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/lib/core.c

index aa8f6a835edc490e736d4ec04fb767f365b29251..9204210804c4f7fab3f4a1f091e14488ff0b030f 100644 (file)
@@ -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;
                        }