summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--serprog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/serprog.c b/serprog.c
index c68449a79..57196a986 100644
--- a/serprog.c
+++ b/serprog.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/
+#include <stdbool.h>
#include <stdio.h>
#if ! IS_WINDOWS /* stuff (presumably) needed for sockets only */
#include <stdlib.h>
@@ -571,7 +572,7 @@ static int serprog_init(const struct programmer_cfg *cfg)
unsigned char rbuf[3];
unsigned char c;
char *device;
- int have_device = 0;
+ bool have_device = false;
/* the parameter is either of format "dev=/dev/device[:baud]" or "ip=ip:port" */
device = extract_programmer_param_str(cfg, "dev");
@@ -598,7 +599,7 @@ static int serprog_init(const struct programmer_cfg *cfg)
free(device);
return 1;
}
- have_device++;
+ have_device = true;
}
}
@@ -637,7 +638,7 @@ static int serprog_init(const struct programmer_cfg *cfg)
free(device);
return 1;
}
- have_device++;
+ have_device = true;
}
}
if (device && !strlen(device)) {