|
From: <kin...@us...> - 2023-07-08 11:21:21
|
Revision: 7050
http://sourceforge.net/p/teem/code/7050
Author: kindlmann
Date: 2023-07-08 11:21:19 +0000 (Sat, 08 Jul 2023)
Log Message:
-----------
Propagating AIR_STRLEN --> AIR_STRLEN +1, with this API CHANGE to struct:
pushEnergy:
char name[AIR_STRLEN_SMALL + 1];
Modified Paths:
--------------
teem/trunk/src/push/corePush.c
teem/trunk/src/push/forces.c
teem/trunk/src/push/push.h
Modified: teem/trunk/src/push/corePush.c
===================================================================
--- teem/trunk/src/push/corePush.c 2023-07-08 11:18:37 UTC (rev 7049)
+++ teem/trunk/src/push/corePush.c 2023-07-08 11:21:19 UTC (rev 7050)
@@ -305,7 +305,7 @@
int /* Biff: 1 */
pushRun(pushContext *pctx) {
static const char me[] = "pushRun";
- char poutS[AIR_STRLEN_MED], toutS[AIR_STRLEN_MED];
+ char poutS[AIR_STRLEN_MED + 1], toutS[AIR_STRLEN_MED + 1];
Nrrd *npos, *nten;
double time0, time1, enrLast, enrNew = AIR_NAN, enrImprov = AIR_NAN,
enrImprovAvg = AIR_NAN;
Modified: teem/trunk/src/push/forces.c
===================================================================
--- teem/trunk/src/push/forces.c 2023-07-08 11:18:37 UTC (rev 7049)
+++ teem/trunk/src/push/forces.c 2023-07-08 11:21:19 UTC (rev 7050)
@@ -404,7 +404,7 @@
}
static int
-_pushHestEnergyParse(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+_pushHestEnergyParse(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
pushEnergySpec **enspP;
static const char me[] = "_pushHestForceParse";
char *perr;
@@ -417,7 +417,7 @@
*enspP = pushEnergySpecNew();
if (pushEnergySpecParse(*enspP, str)) {
perr = biffGetDone(PUSH);
- airStrcpy(err, AIR_STRLEN_HUGE, perr);
+ airStrcpy(err, AIR_STRLEN_HUGE + 1, perr);
free(perr);
return 1;
}
Modified: teem/trunk/src/push/push.h
===================================================================
--- teem/trunk/src/push/push.h 2023-07-08 11:18:37 UTC (rev 7049)
+++ teem/trunk/src/push/push.h 2023-07-08 11:21:19 UTC (rev 7050)
@@ -135,7 +135,7 @@
** non-NULL pointers into which to store energy and force
*/
typedef struct {
- char name[AIR_STRLEN_SMALL];
+ char name[AIR_STRLEN_SMALL + 1];
unsigned int parmNum;
void (*eval)(double *energy, double *force, double dist,
const double parm[PUSH_ENERGY_PARM_NUM]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|