aboutsummaryrefslogtreecommitdiff
path: root/networks/gnutls_buffered.c
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>1970-01-01 00:00:00 +0000
committerTest_User <hax@andrewyu.org>2024-07-24 01:04:53 -0400
commitdaa4cd4177690641a8fc29b836824856abf60711 (patch)
tree6c147979564bf87f9f784dd15eb9e65acfa59bf0 /networks/gnutls_buffered.c
parent6bda8db538d8d9edbca3f607698f828c763966b2 (diff)
downloadhaxircd-daa4cd4177690641a8fc29b836824856abf60711.tar.gz
haxircd-daa4cd4177690641a8fc29b836824856abf60711.zip
haxstring: Add parenthesis to macro arguments
WRITES(fd, *s) where s is a pointer to a struct string will not compile, as the macro expands to write(fd, *s.data, *s.len), which it expects s to be a struct string and attempts to use s.data and s.len as pointers. This is, of course, erroneous. The correct expansion is write(fd, (*s).data, (*s).len); while write(fd, s->data, s->len) is desirable, it is not achievable with a simple macro expansion. In any case, the parenthesis shall be added.
Diffstat (limited to 'networks/gnutls_buffered.c')
0 files changed, 0 insertions, 0 deletions