simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Jun 1 11:17:35 BST 2022
TL;DR:
e0959d46 Macro wrapper on ctrl_radiobuttons to fill in the NULL.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2022-06-01 11:17:35
commit e0959d46471aeb94b3db4de662e124041f7d10f3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e0959d46471aeb94b3db4de662e124041f7d10f3;hp=5a28658a6d815a69df75166115fb2c1e20b5c19a
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 1 11:14:21 2022 +0100
Macro wrapper on ctrl_radiobuttons to fill in the NULL.
ctrl_radiobuttons has a variadic argument list that it expects to be
terminated by a null pointer where a const char * should be. So the
terminating NULL at each call site ought to be cast to const char *,
for the usual reason (NULL might expand literally to something not the
same size as a pointer and get mis-marshalled in the variadic argument
list). It wasn't being.
Fixed in the same way as dupcat: I've turned ctrl_radiobuttons into a
macro wrapper on the underlying function, which adds the NULL
automatically with its correct cast. This also saves verbiage at every
call site, because now I can leave out all the NULLs there.
config.c | 80 +++++++++++++++++++++++++-------------------------------
dialog.c | 6 ++---
dialog.h | 8 +++---
windows/config.c | 8 +++---
4 files changed, 47 insertions(+), 55 deletions(-)
More information about the tartarus-commits
mailing list