debian/copyright: document the license of some scripts from contrib/
[libam7xxx.git] / src / am7xxx.c
index ffdd59c..ebc403e 100644 (file)
@@ -1,6 +1,6 @@
 /* am7xxx - communication with AM7xxx based USB Pico Projectors and DPFs
  *
 /* am7xxx - communication with AM7xxx based USB Pico Projectors and DPFs
  *
- * Copyright (C) 2012  Antonio Ospite <ospite@studenti.unina.it>
+ * Copyright (C) 2012-2014  Antonio Ospite <ao2@ao2.it>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1128,7 +1128,7 @@ AM7XXX_PUBLIC int am7xxx_get_device_info(am7xxx_device *dev,
                           am7xxx_device_info *device_info)
 {
        int ret;
                           am7xxx_device_info *device_info)
 {
        int ret;
-       struct am7xxx_header h = { 0 };
+       struct am7xxx_header h;
 
        if (dev->device_info) {
                memcpy(device_info, dev->device_info, sizeof(*device_info));
 
        if (dev->device_info) {
                memcpy(device_info, dev->device_info, sizeof(*device_info));
@@ -1139,6 +1139,7 @@ AM7XXX_PUBLIC int am7xxx_get_device_info(am7xxx_device *dev,
        if (ret < 0)
                return ret;
 
        if (ret < 0)
                return ret;
 
+       memset(&h, 0, sizeof(h));
        ret = read_header(dev, &h);
        if (ret < 0)
                return ret;
        ret = read_header(dev, &h);
        if (ret < 0)
                return ret;