ftdi_eeprom_initdefaults const arguments
authorTomasz Wasilczyk <tomkiewi@gmail.com>
Thu, 11 Mar 2021 23:47:06 +0000 (15:47 -0800)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Sun, 2 May 2021 07:15:38 +0000 (09:15 +0200)
This function don't need to modify its arguments.

src/ftdi.c
src/ftdi.h

index db66b87..88216bf 100644 (file)
@@ -2576,8 +2576,8 @@ int ftdi_set_error_char(struct ftdi_context *ftdi,
     \retval -2: No struct ftdi_eeprom
     \retval -3: No connected device or device not yet opened
 */
-int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, char * manufacturer,
-                             char * product, char * serial)
+int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, const char * manufacturer,
+                             const char * product, const char * serial)
 {
     struct ftdi_eeprom *eeprom;
 
index fb45008..0603335 100644 (file)
@@ -609,8 +609,8 @@ extern "C"
 
     /* init eeprom for the given FTDI type */
     int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi,
-                                 char * manufacturer, char *product,
-                                 char * serial);
+                                 const char * manufacturer, const char *product,
+                                 const char * serial);
     int ftdi_eeprom_build(struct ftdi_context *ftdi);
     int ftdi_eeprom_decode(struct ftdi_context *ftdi, int verbose);