chip: rename is_unsigned_int()
authorBartosz Golaszewski <bartekgola@gmail.com>
Thu, 29 Jun 2017 13:36:01 +0000 (15:36 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Thu, 6 Jul 2017 09:11:36 +0000 (11:11 +0200)
Use a shorter name for this simple routine.

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

index 9457574d0d3a987c943c5a0ff12a3ef6893bd7d3..74d8b7b10acfc4de8106f0f78e897c4c7be35d31 100644 (file)
@@ -25,7 +25,7 @@ struct gpiod_chip {
        struct gpiod_line *lines;
 };
 
-static bool is_unsigned_int(const char *str)
+static bool isuint(const char *str)
 {
        for (; *str && isdigit(*str); str++);
 
@@ -132,7 +132,7 @@ struct gpiod_chip * gpiod_chip_open_lookup(const char *descr)
 {
        struct gpiod_chip *chip;
 
-       if (is_unsigned_int(descr)) {
+       if (isuint(descr)) {
                chip = gpiod_chip_open_by_number(strtoul(descr, NULL, 10));
        } else {
                chip = gpiod_chip_open_by_label(descr);