projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
50345ee
)
Merge pull request #1208 from jy2wong/master
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 15 Apr 2016 09:49:57 +0000
(11:49 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 15 Apr 2016 09:49:57 +0000
(11:49 +0200)
Fix void* arithmetic warning (-Wpointer-arith)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
171904d
..
3f39aac
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-1369,7
+1369,7
@@
static int parse_part_encr_aes256 (sockent_t *se, /* {{{ */
warning_has_been_printed = 1;
}
- *ret_buffer
+= ph_length
;
+ *ret_buffer
= (void *) (((char *) *ret_buffer) + ph_length)
;
*ret_buffer_size -= ph_length;
return (0);
@@
-1408,7
+1408,7
@@
static int parse_packet (sockent_t *se, /* {{{ */
(void *) buffer,
sizeof (pkg_type));
memcpy ((void *) &pkg_length,
- (void *) (
buffer
+ sizeof (pkg_type)),
+ (void *) (
((char *) buffer)
+ sizeof (pkg_type)),
sizeof (pkg_length));
pkg_length = ntohs (pkg_length);