kopia lustrzana https://github.com/Hamlib/Hamlib
Fix RETURNFUNC -- when RETURNFUNC(function) was used is was calling the function multiple times
https://github.com/Hamlib/Hamlib/issues/595pull/608/head
rodzic
74a10af560
commit
7b58661d12
|
@ -142,9 +142,12 @@ extern HAMLIB_EXPORT(int) parse_hoststr(char *host, char hoststr[256], char port
|
|||
void errmsg(int err, char *s, const char *func, const char *file, int line);
|
||||
#define ERRMSG(err, s) errmsg(err, s, __func__, __FILENAME__, __LINE__)
|
||||
#define ENTERFUNC rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILENAME__, __LINE__, __func__)
|
||||
// we need to refer to rc just once as it
|
||||
// could be a function call
|
||||
#define RETURNFUNC(rc) do { \
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return(%ld)\n", __FILENAME__, __LINE__, __func__, (long int) (rc)); \
|
||||
return (rc); \
|
||||
int rctmp = rc; \
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return(%ld)\n", __FILENAME__, __LINE__, __func__, (long int) (rctmp)); \
|
||||
return (rctmp); \
|
||||
} while(0)
|
||||
|
||||
#if 0 // 5.0
|
||||
|
|
Ładowanie…
Reference in New Issue