diff options
-rw-r--r-- | serprog.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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)) { |