]> git.zerfleddert.de Git - hmcfgusb/blobdiff - flash-ota.c
fix variable assignment, copyright year
[hmcfgusb] / flash-ota.c
index 71cb57e548bbe35970a571ba516185f6291f6925..fdd5936b250e283b08a809d9a90374e5ca73cb69 100644 (file)
@@ -207,7 +207,7 @@ int send_hm_message(struct ota_dev *dev, struct recv_data *rdata, uint8_t *msg)
                        break;
                case DEVICE_TYPE_CULFW:
                        {
-                               char buf[128];
+                               char buf[256];
                                int i;
 
                                memset(buf, 0, sizeof(buf));
@@ -234,7 +234,7 @@ int send_hm_message(struct ota_dev *dev, struct recv_data *rdata, uint8_t *msg)
                                                pfd = culfw_poll(dev->culfw, 1);
                                                if ((pfd < 0) && errno) {
                                                        if (errno != ETIMEDOUT) {
-                                                               perror("\n\nhmcfgusb_poll");
+                                                               perror("\n\nculfw_poll");
                                                                exit(EXIT_FAILURE);
                                                        }
                                                }
@@ -450,8 +450,8 @@ int main(int argc, char **argv)
        printf("Waiting for device with serial %s\n", serial);
 
        while (1) {
+               errno = 0;
                switch (dev.type) {
-                       errno = 0;
                        case DEVICE_TYPE_CULFW:
                                pfd = culfw_poll(dev.culfw, 1);
                                break;
@@ -659,7 +659,7 @@ int main(int argc, char **argv)
                }
                if ((pfd < 0) && errno) {
                        if (errno != ETIMEDOUT) {
-                               perror("\n\nhmcfgusb_poll");
+                               perror("\n\npoll");
                                exit(EXIT_FAILURE);
                        }
                }
Impressum, Datenschutz