diff options
author | Haru <haru@dotalux.com> | 2016-01-07 17:37:37 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-24 21:00:31 +0100 |
commit | 900af5d0b8f5b6f20a1967c9cfb83bcefdb5de8e (patch) | |
tree | 4a4bca7d6498052afff5a2e06cf9cb4d7007a803 | |
parent | d734e17ce1cbbd2379fc438a3269416d2ff1ed44 (diff) | |
download | hercules-900af5d0b8f5b6f20a1967c9cfb83bcefdb5de8e.tar.gz hercules-900af5d0b8f5b6f20a1967c9cfb83bcefdb5de8e.tar.bz2 hercules-900af5d0b8f5b6f20a1967c9cfb83bcefdb5de8e.tar.xz hercules-900af5d0b8f5b6f20a1967c9cfb83bcefdb5de8e.zip |
Changed RFIFO2PTR (and P2PTR) to return const void*
- Also increased robustness of the macro
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | src/common/socket.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/socket.h b/src/common/socket.h index 07c8608d8..5ff56bdc8 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -77,11 +77,11 @@ struct config_setting_t; #define RFIFOSKIP(fd, len) (sockt->rfifoskip(fd, len)) /* [Ind/Hercules] */ -#define RFIFO2PTR(fd) (void*)(sockt->session[fd]->rdata + sockt->session[fd]->rdata_pos) +#define RFIFO2PTR(fd) ((const void *)(sockt->session[fd]->rdata + sockt->session[fd]->rdata_pos)) #define RP2PTR(fd) RFIFO2PTR(fd) /* [Hemagx/Hercules] */ -#define WFIFO2PTR(fd) (void*)(sockt->session[fd]->wdata + sockt->session[fd]->wdata_size) +#define WFIFO2PTR(fd) ((void *)(sockt->session[fd]->wdata + sockt->session[fd]->wdata_size)) #define WP2PTR(fd) WFIFO2PTR(fd) // buffer I/O macros |