Browse code

core/fixups: updates to reflect usage of pv cache for pv_elem_t

Elena-Ramona Modroiu authored on 26/09/2012 10:09:10
Showing 2 changed files
... ...
@@ -484,7 +484,8 @@ int fixup_free_igp_pvar_pvar(void** param, int param_no)
484 484
 				return E_UNSPEC; \
485 485
 			} else{ \
486 486
 				fp=(fparam_t*)*param; \
487
-				if ((ret==0) && (fp->v.pve->spec.getf==0)){ \
487
+				if ((ret==0) && (fp->v.pve->spec==0 \
488
+							|| fp->v.pve->spec->getf==0)){ \
488 489
 					fparam_free_restore(param); \
489 490
 					return fix_param_types(FPARAM_STR, param); \
490 491
 				} else if (ret==1) \
... ...
@@ -1410,7 +1410,7 @@ int fixup_var_pve_12(void** param, int param_no)
1410 1410
 			   If the resulting PVE is static (normal string), discard
1411 1411
 			   it and use the normal string fixup (faster at runtime) */
1412 1412
 			fp = (fparam_t*)*param;
1413
-			if (fp->v.pve->spec.getf == 0)
1413
+			if (fp->v.pve->spec == 0 || fp->v.pve->spec->getf == 0)
1414 1414
 				fparam_free_restore(param); /* fallback to STR below */
1415 1415
 			else
1416 1416
 				return ret; /* dynamic PVE => return */
... ...
@@ -1452,7 +1452,7 @@ int fixup_var_pve_str_12(void** param, int param_no)
1452 1452
 			   If the resulting PVE is static (normal string), discard
1453 1453
 			   it and use the normal string fixup (faster at runtime) */
1454 1454
 			fp = (fparam_t*)*param;
1455
-			if (fp->v.pve->spec.getf == 0)
1455
+			if (fp->v.pve->spec == 0 || fp->v.pve->spec->getf == 0)
1456 1456
 				fparam_free_restore(param); /* fallback to STR below */
1457 1457
 			else
1458 1458
 				return ret; /* dynamic PVE => return */