diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-03-09 19:50:15 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:35:08 -0700 |
commit | 17794d77b97fcb8af263bcecbe03dad5d0e9a89a (patch) | |
tree | fc87f4d731a6543aaae346875768ff57fc85413a /udev-remove.c | |
parent | 3f20eac0a58dc3987200773a39163e30b60993fc (diff) |
[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-remove.c')
-rw-r--r-- | udev-remove.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/udev-remove.c b/udev-remove.c index 195b987411..44ad603d4a 100644 --- a/udev-remove.c +++ b/udev-remove.c @@ -103,7 +103,7 @@ static int delete_node(struct udevice *dev) delete_path(filename); foreach_strpart(dev->symlink, " ", pos, len) { - strnfieldcpy(linkname, pos, len+1); + strfieldcpymax(linkname, pos, len+1); strfieldcpy(filename, udev_root); strfieldcat(filename, linkname); |