From 467ce2a07a43d1a8b0d43560a3e97b96c295d0c3 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 4 Dec 2022 16:41:50 -0600 Subject: [PATCH] Match guard symbols to command names, and yank duplicate initialization. --- toys/other/gpiod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toys/other/gpiod.c b/toys/other/gpiod.c index cc3ce64f..d667bf4c 100644 --- a/toys/other/gpiod.c +++ b/toys/other/gpiod.c @@ -5,9 +5,9 @@ * TODO: gpiomon USE_GPIODETECT(NEWTOY(gpiodetect, ">0", TOYFLAG_USR|TOYFLAG_BIN)) -USE_GPIOFIND(NEWTOY(gpioinfo, 0, TOYFLAG_USR|TOYFLAG_BIN)) +USE_GPIOINFO(NEWTOY(gpioinfo, 0, TOYFLAG_USR|TOYFLAG_BIN)) USE_GPIOGET(NEWTOY(gpioget, "<2l", TOYFLAG_USR|TOYFLAG_BIN)) -USE_GPIOINFO(NEWTOY(gpiofind, "<1>1", TOYFLAG_USR|TOYFLAG_BIN)) +USE_GPIOFIND(NEWTOY(gpiofind, "<1>1", TOYFLAG_USR|TOYFLAG_BIN)) USE_GPIOSET(NEWTOY(gpioset, "<2l", TOYFLAG_USR|TOYFLAG_BIN)) config GPIODETECT @@ -100,7 +100,7 @@ static int comparator(const void *a, const void *b) static void foreach_chip(void (*cb)(char *name)) { struct double_list **sorted; - int i = 0; + int i; dirtree_flagread("/dev", DIRTREE_SHUTUP, collect_chips); if (!TT.chips) return; -- 2.39.2