Revision: 76772
http://sourceforge.net/p/brlcad/code/76772
Author: brlcad
Date: 2020-08-15 02:33:03 +0000 (Sat, 15 Aug 2020)
Log Message:
-----------
input is const, no reason for copying it
Modified Paths:
--------------
brlcad/trunk/src/libbu/units.c
Modified: brlcad/trunk/src/libbu/units.c
===================================================================
--- brlcad/trunk/src/libbu/units.c 2020-08-15 02:29:08 UTC (rev 76771)
+++ brlcad/trunk/src/libbu/units.c 2020-08-15 02:33:03 UTC (rev 76772)
@@ -243,15 +243,11 @@
{
register const struct cvt_tab *tp;
register const struct conv_table *cvtab;
- char ubuf[256];
- /* Copy the given string */
- bu_strlcpy(ubuf, str, sizeof(ubuf));
-
/* Search for this string in the table */
for (cvtab=unit_lists; cvtab->cvttab; cvtab++) {
for (tp=cvtab->cvttab; tp->name[0]; tp++) {
- if (!units_name_matches(ubuf, tp->name))
+ if (!units_name_matches(str, tp->name))
continue;
return tp->val;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits