|
From: <kin...@us...> - 2023-07-08 12:03:15
|
Revision: 7055
http://sourceforge.net/p/teem/code/7055
Author: kindlmann
Date: 2023-07-08 12:03:12 +0000 (Sat, 08 Jul 2023)
Log Message:
-----------
avoiding needless string copy
Modified Paths:
--------------
teem/trunk/src/hest/adders.c
Modified: teem/trunk/src/hest/adders.c
===================================================================
--- teem/trunk/src/hest/adders.c 2023-07-08 11:54:14 UTC (rev 7054)
+++ teem/trunk/src/hest/adders.c 2023-07-08 12:03:12 UTC (rev 7055)
@@ -135,10 +135,9 @@
hestOptAdd_1_Enum(hestOpt **optP, const char *flag, const char *name, /* */
int *valueP, int dflt, const char *info, /* */
const airEnum *enm) {
- char dfltStr[AIR_STRLEN_SMALL + 1];
- airStrcpy(dfltStr, AIR_STRLEN_SMALL + 1, airEnumStr(enm, dflt));
+
return hestOptAdd_nva(optP, flag, name, airTypeEnum, 1, 1, /* */
- valueP, dfltStr, info, /* */
+ valueP, airEnumStr(enm, dflt), info, /* */
NULL, enm, NULL);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|