]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Make std_baudrates[] static (only used in one file).
[libserialport.git] / libserialport_internal.h
index 08e4eb2094cce65fe9820d2f87673c931b0f5f9d..55108240be0ab6219884701b9589c9ed24be111f 100644 (file)
@@ -24,7 +24,7 @@
 #include "config.h"
 
 #ifdef __linux__
-#define _BSD_SOURCE // for timeradd, timersub, timercmp
+#define _BSD_SOURCE /* For timeradd, timersub, timercmp. */
 #endif
 
 #include <string.h>
@@ -160,10 +160,7 @@ struct std_baudrate {
        int value;
 };
 
-extern const struct std_baudrate std_baudrates[];
-
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#define NUM_STD_BAUDRATES ARRAY_SIZE(std_baudrates)
 
 extern void (*sp_debug_handler)(const char *format, ...);
 
@@ -182,7 +179,7 @@ extern void (*sp_debug_handler)(const char *format, ...);
 #define RETURN() do { \
        DEBUG_FMT("%s returning", __func__); \
        return; \
-} while(0)
+} while (0)
 #define RETURN_CODE(x) do { \
        DEBUG_FMT("%s returning " #x, __func__); \
        return x; \