summaryrefslogtreecommitdiff
path: root/udev_config.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-03-09 19:50:15 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:08 -0700
commit17794d77b97fcb8af263bcecbe03dad5d0e9a89a (patch)
treefc87f4d731a6543aaae346875768ff57fc85413a /udev_config.c
parent3f20eac0a58dc3987200773a39163e30b60993fc (diff)
downloadsystemd-17794d77b97fcb8af263bcecbe03dad5d0e9a89a.tar.gz
[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.
Diffstat (limited to 'udev_config.c')
-rw-r--r--udev_config.c2
1 files changed, 1 insertions, 1 deletions
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) \