printf(" is not a CK_BBOOL or CK_ULONG\n");
fprintf(stderr, " is not a CK_BBOOL or CK_ULONG\n");
CK_RV SetTemplate(Value *vp, CK_ULONG index, CK_ULONG value){    CK_ATTRIBUTE *template = (CK_ATTRIBUTE *)vp->data;    int isbool = 0;    CK_ULONG len;    ConstType attrType;    if (index >= vp->arraySize) {	fprintf(stderr,"index (%lu) greater than array (%d)\n", 						index, vp->arraySize);	return CKR_ARGUMENTS_BAD;    }    attrType =  getConstFromAttribute(template[index].type);    if (attrType == ConstNone) {	fprintf(stderr,"can't set index (%lu) because ", index);	printConst(template[index].type,ConstAttribute, 0);	printf(" is not a CK_BBOOL or CK_ULONG\n");	return CKR_ARGUMENTS_BAD;    }    isbool = (attrType == ConstBool);    len = isbool ? sizeof (CK_BBOOL) : sizeof(CK_ULONG);    if ((template[index].ulValueLen != len) || (template[index].pValue)) {	free(template[index].pValue);	template[index].pValue = malloc(len);	template[index].ulValueLen = len;    }    if (isbool) {	*(CK_BBOOL *)template[index].pValue = (CK_BBOOL) value;    } else {	*(CK_ULONG *)template[index].pValue = (CK_ULONG) value;    }    return CKR_OK;}