kopia lustrzana https://github.com/Hamlib/Hamlib
Change SNPRINTF message to print to stderr
https://github.com/Hamlib/Hamlib/issues/857pull/943/head
rodzic
fa67809b32
commit
ea6f0bdff6
|
@ -3160,7 +3160,7 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debu
|
|||
#define ELAPSED2 rig_debug(RIG_DEBUG_TRACE, "%s: elapsed=%.0lfms\n", __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET));
|
||||
|
||||
// use this instead of snprintf for automatic detection of buffer limit
|
||||
#define SNPRINTF(s,n,...) { snprintf(s,n,##__VA_ARGS__);if (strlen(s) > n-1) printf("%s(%d): buffer overflow\n", __func__, __LINE__); }
|
||||
#define SNPRINTF(s,n,...) { snprintf(s,n,##__VA_ARGS__);if (strlen(s) > n-1) fprintf(stderr,"****** %s(%d): buffer overflow ******\n", __func__, __LINE__); }
|
||||
|
||||
extern HAMLIB_EXPORT(void)
|
||||
rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
|
||||
|
|
Ładowanie…
Reference in New Issue