From 17794d77b97fcb8af263bcecbe03dad5d0e9a89a Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Tue, 9 Mar 2004 19:50:15 -0800 Subject: [PATCH] rename strn*() macros to strmax Hey, I wrote the strn*() macros just 10 days ago and yesterday this trap caught me with the %c{x} bug. The names are misleading cause we all expect that the from field is limited by the size argument, but we actually limit the overall size of the destination string to prevent a overflow. Here we rename all strn*() macros to str*max(). That should be more self-explanatory. --- udev_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'udev_config.c') diff --git a/udev_config.c b/udev_config.c index de83ef9c4c..e2031dc64d 100644 --- a/udev_config.c +++ b/udev_config.c @@ -81,7 +81,7 @@ static void init_variables(void) #define set_var(_name, _var) \ if (strcasecmp(variable, _name) == 0) { \ dbg_parse("%s = '%s'", _name, value); \ - strnfieldcpy(_var, value, sizeof(_var));\ + strfieldcpymax(_var, value, sizeof(_var));\ } #define set_bool(_name, _var) \ -- cgit v1.2.3-54-g00ecf