#include <IOKit/IOKitKeys.h>
#include <IOKit/IOKitKeysPrivate.h>
#include <kern/debug.h>
+#include <pexpert/boot.h>
#include <pexpert/pexpert.h>
+
#define super IOService
#define kIONVRAMPrivilege kIOClientPrivilegeAdministrator
}
dict = OSDictionary::withCapacity(1);
- if (dict == 0) {
+ if (dict == NULL) {
return false;
}
setPropertyTable(dict);
+ dict->release();
_nvramImage = IONew(UInt8, kIODTNVRAMImageSize);
- if (_nvramImage == 0) {
+ if (_nvramImage == NULL) {
return false;
}
_nvramPartitionOffsets = OSDictionary::withCapacity(1);
- if (_nvramPartitionOffsets == 0) {
+ if (_nvramPartitionOffsets == NULL) {
return false;
}
_nvramPartitionLengths = OSDictionary::withCapacity(1);
- if (_nvramPartitionLengths == 0) {
+ if (_nvramPartitionLengths == NULL) {
return false;
}
_registryPropertiesKey = OSSymbol::withCStringNoCopy("aapl,pci");
- if (_registryPropertiesKey == 0) {
+ if (_registryPropertiesKey == NULL) {
return false;
}
const void *bytes;
entry = IORegistryEntry::fromPath("/chosen", gIODTPlane);
- if (entry != 0) {
+ if (entry != NULL) {
prop = entry->getProperty(key);
- if (prop != 0) {
+ if (prop != NULL) {
data = OSDynamicCast(OSData, prop);
- if (data != 0) {
+ if (data != NULL) {
bytes = data->getBytesNoCopy();
- if ((bytes != 0) && (data->getLength() <= kIODTNVRAMImageSize)) {
+ if ((bytes != NULL) && (data->getLength() <= kIODTNVRAMImageSize)) {
bcopy(bytes, _nvramImage, data->getLength());
initNVRAMImage();
_isProxied = true;
void
IODTNVRAM::registerNVRAMController(IONVRAMController *nvram)
{
- if (_nvramController != 0) {
+ if (_nvramController != NULL) {
return;
}
if (!_isProxied) {
_nvramController->read(0, _nvramImage, kIODTNVRAMImageSize);
initNVRAMImage();
- } else {
+ } else if (_ofLock) {
IOLockLock(_ofLock);
(void) syncVariables();
IOLockUnlock(_ofLock);
_nvramImage[freePartitionOffset + 1] =
calculatePartitionChecksum(_nvramImage + freePartitionOffset);
- if (_nvramController != 0) {
+ if (_nvramController != NULL) {
_nvramController->write(0, _nvramImage, kIODTNVRAMImageSize);
}
}
IODTNVRAM::syncInternal(bool rateLimit)
{
// Don't try to perform controller operations if none has been registered.
- if (_nvramController == 0) {
+ if (_nvramController == NULL) {
return;
}
UInt32 variablePerm;
const OSSymbol *key;
OSDictionary *dict;
- OSCollectionIterator *iter = 0;
+ OSCollectionIterator *iter = NULL;
// Verify permissions.
hasPrivilege = (kIOReturnSuccess == IOUserClient::clientHasPrivilege(current_task(), kIONVRAMPrivilege));
- if (_ofDict == 0) {
+ if (_ofDict == NULL) {
/* No nvram. Return an empty dictionary. */
dict = OSDictionary::withCapacity(1);
- if (dict == 0) {
+ if (dict == NULL) {
return false;
}
} else {
IOLockLock(_ofLock);
dict = OSDictionary::withDictionary(_ofDict);
IOLockUnlock(_ofLock);
- if (dict == 0) {
+ if (dict == NULL) {
return false;
}
/* Copy properties with client privilege. */
iter = OSCollectionIterator::withCollection(dict);
- if (iter == 0) {
+ if (iter == NULL) {
dict->release();
return false;
}
while (1) {
key = OSDynamicCast(OSSymbol, iter->getNextObject());
- if (key == 0) {
+ if (key == NULL) {
break;
}
result = dict->serialize(s);
dict->release();
- if (iter != 0) {
+ if (iter != NULL) {
iter->release();
}
UInt32 variablePerm;
OSObject *theObject;
- if (_ofDict == 0) {
- return 0;
+ if (_ofDict == NULL) {
+ return NULL;
}
// Verify permissions.
result = IOUserClient::clientHasPrivilege(current_task(), kIONVRAMPrivilege);
if (result != kIOReturnSuccess) {
if (variablePerm == kOFVariablePermRootOnly) {
- return 0;
+ return NULL;
}
}
if (variablePerm == kOFVariablePermKernelOnly && current_task() != kernel_task) {
- return 0;
+ return NULL;
}
IOLockLock(_ofLock);
IODTNVRAM::copyProperty(const char *aKey) const
{
const OSSymbol *keySymbol;
- OSObject *theObject = 0;
+ OSObject *theObject = NULL;
keySymbol = OSSymbol::withCString(aKey);
- if (keySymbol != 0) {
+ if (keySymbol != NULL) {
theObject = copyProperty(keySymbol);
keySymbol->release();
}
return theObject;
}
-bool
-IODTNVRAM::setProperty(const OSSymbol *aKey, OSObject *anObject)
+IOReturn
+IODTNVRAM::setPropertyInternal(const OSSymbol *aKey, OSObject *anObject)
{
- bool result;
+ IOReturn result = kIOReturnSuccess;
UInt32 propType, propPerm;
- OSString *tmpString = 0;
- OSObject *propObject = 0, *oldObject;
+ OSString *tmpString = NULL;
+ OSObject *propObject = NULL, *oldObject;
- if (_ofDict == 0) {
+ if (_ofDict == NULL) {
return false;
}
propPerm = getOFVariablePerm(aKey);
if (IOUserClient::clientHasPrivilege(current_task(), kIONVRAMPrivilege) != kIOReturnSuccess) {
if (propPerm != kOFVariablePermUserWrite) {
- return false;
+ return kIOReturnNotPrivileged;
}
}
if (propPerm == kOFVariablePermKernelOnly && current_task() != kernel_task) {
- return 0;
+ return kIOReturnNotPrivileged;
}
// Don't allow change of 'aapl,panic-info'.
if (aKey->isEqualTo(kIODTNVRAMPanicInfoKey)) {
- return false;
+ return kIOReturnUnsupported;
}
// Make sure the object is of the correct type.
case kOFVariableTypeString:
propObject = OSDynamicCast(OSString, anObject);
+ if (propObject != NULL && aKey->isEqualTo(kIONVRAMBootArgsKey) && ((OSString*)propObject)->getLength() >= BOOT_LINE_LENGTH) {
+ return kIOReturnNoSpace;
+ }
break;
case kOFVariableTypeData:
propObject = OSDynamicCast(OSData, anObject);
- if (propObject == 0) {
+ if (propObject == NULL) {
tmpString = OSDynamicCast(OSString, anObject);
- if (tmpString != 0) {
+ if (tmpString != NULL) {
propObject = OSData::withBytes(tmpString->getCStringNoCopy(),
tmpString->getLength());
}
break;
}
- if (propObject == 0) {
- return false;
+ if (propObject == NULL) {
+ return kIOReturnBadArgument;
}
IOLockLock(_ofLock);
if (oldObject) {
oldObject->retain();
}
- result = _ofDict->setObject(aKey, propObject);
+ if (!_ofDict->setObject(aKey, propObject)) {
+ result = kIOReturnBadArgument;
+ }
- if (result) {
+ if (result == kIOReturnSuccess) {
if (syncVariables() != kIOReturnSuccess) {
if (oldObject) {
_ofDict->setObject(aKey, oldObject);
_ofDict->removeObject(aKey);
}
(void) syncVariables();
- result = false;
+ result = kIOReturnNoMemory;
}
}
return result;
}
+bool
+IODTNVRAM::setProperty(const OSSymbol *aKey, OSObject *anObject)
+{
+ return setPropertyInternal(aKey, anObject) == kIOReturnSuccess;
+}
+
void
IODTNVRAM::removeProperty(const OSSymbol *aKey)
{
bool result;
UInt32 propPerm;
- if (_ofDict == 0) {
+ if (_ofDict == NULL) {
return;
}
// If the object exists, remove it from the dictionary.
IOLockLock(_ofLock);
- result = _ofDict->getObject(aKey) != 0;
+ result = _ofDict->getObject(aKey) != NULL;
if (result) {
_ofDict->removeObject(aKey);
}
IOReturn
IODTNVRAM::setProperties(OSObject *properties)
{
- bool result = true;
+ IOReturn res = kIOReturnSuccess;
OSObject *object;
const OSSymbol *key;
const OSString *tmpStr;
OSCollectionIterator *iter;
dict = OSDynamicCast(OSDictionary, properties);
- if (dict == 0) {
+ if (dict == NULL) {
return kIOReturnBadArgument;
}
iter = OSCollectionIterator::withCollection(dict);
- if (iter == 0) {
+ if (iter == NULL) {
return kIOReturnBadArgument;
}
- while (result) {
+ while (res == kIOReturnSuccess) {
key = OSDynamicCast(OSSymbol, iter->getNextObject());
- if (key == 0) {
+ if (key == NULL) {
break;
}
object = dict->getObject(key);
- if (object == 0) {
+ if (object == NULL) {
continue;
}
if (key->isEqualTo(kIONVRAMDeletePropertyKey)) {
tmpStr = OSDynamicCast(OSString, object);
- if (tmpStr != 0) {
+ if (tmpStr != NULL) {
key = OSSymbol::withString(tmpStr);
removeProperty(key);
key->release();
- result = true;
} else {
- result = false;
+ res = kIOReturnError;
}
} else if (key->isEqualTo(kIONVRAMSyncNowPropertyKey) || key->isEqualTo(kIONVRAMForceSyncNowPropertyKey)) {
tmpStr = OSDynamicCast(OSString, object);
- if (tmpStr != 0) {
- result = true;
-
+ if (tmpStr != NULL) {
// We still want to throttle NVRAM commit rate for SyncNow. ForceSyncNow is provided as a really big hammer.
-
syncInternal(key->isEqualTo(kIONVRAMSyncNowPropertyKey));
} else {
- result = false;
+ res = kIOReturnError;
}
} else {
- result = setProperty(key, object);
+ if (!setProperty(key, object)) {
+ res = kIOReturnNoSpace;
+ }
}
}
iter->release();
- if (result) {
- return kIOReturnSuccess;
- } else {
- return kIOReturnError;
- }
+ return res;
}
IOReturn
partitionLengthNumber =
(OSNumber *)_nvramPartitionLengths->getObject(partitionID);
- if ((partitionOffsetNumber == 0) || (partitionLengthNumber == 0)) {
+ if ((partitionOffsetNumber == NULL) || (partitionLengthNumber == NULL)) {
return kIOReturnNotFound;
}
if (os_add_overflow(offset, length, &end)) {
return kIOReturnBadArgument;
}
- if ((buffer == 0) || (length == 0) || (end > partitionLength)) {
+ if ((buffer == NULL) || (length == 0) || (end > partitionLength)) {
return kIOReturnBadArgument;
}
partitionLengthNumber =
(OSNumber *)_nvramPartitionLengths->getObject(partitionID);
- if ((partitionOffsetNumber == 0) || (partitionLengthNumber == 0)) {
+ if ((partitionOffsetNumber == NULL) || (partitionLengthNumber == NULL)) {
return kIOReturnNotFound;
}
if (os_add_overflow(offset, length, &end)) {
return kIOReturnBadArgument;
}
- if ((buffer == 0) || (length == 0) || (end > partitionLength)) {
+ if ((buffer == NULL) || (length == 0) || (end > partitionLength)) {
return kIOReturnBadArgument;
}
bcopy(buffer, _nvramImage + partitionOffset + offset, length);
- if (_nvramController != 0) {
+ if (_nvramController != NULL) {
_nvramController->write(0, _nvramImage, kIODTNVRAMImageSize);
}
IOByteCount
IODTNVRAM::savePanicInfo(UInt8 *buffer, IOByteCount length)
{
- if ((_piImage == 0) || (length <= 0)) {
+ if ((_piImage == NULL) || (length <= 0)) {
return 0;
}
// Save the Panic Info length.
*(UInt32 *)_piImage = length;
- if (_nvramController != 0) {
+ if (_nvramController != NULL) {
_nvramController->write(0, _nvramImage, kIODTNVRAMImageSize);
}
/*
const OSSymbol *propSymbol;
OSObject *propObject;
- if (_ofImage == 0) {
+ if (_ofImage == NULL) {
return kIOReturnNotReady;
}
}
// Create the boot-args property if it is not in the dictionary.
- if (_ofDict->getObject("boot-args") == 0) {
+ if (_ofDict->getObject(kIONVRAMBootArgsKey) == NULL) {
propObject = OSString::withCStringNoCopy("");
- if (propObject != 0) {
- _ofDict->setObject("boot-args", propObject);
+ if (propObject != NULL) {
+ _ofDict->setObject(kIONVRAMBootArgsKey, propObject);
propObject->release();
}
}
- if (_piImage != 0) {
+ if (_piImage != NULL) {
propDataLength = *(UInt32 *)_piImage;
if ((propDataLength != 0) && (propDataLength <= (_piPartitionSize - 4))) {
propObject = OSData::withBytes(_piImage + 4, propDataLength);
// Clear the length from _piImage and mark dirty.
*(UInt32 *)_piImage = 0;
- if (_nvramController != 0) {
+ if (_nvramController != NULL) {
_nvramController->write(0, _nvramImage, kIODTNVRAMImageSize);
}
}
IOLockAssert(_ofLock, kIOLockAssertOwned);
- if ((_ofImage == 0) || (_ofDict == 0) || _systemPaniced) {
+ if ((_ofImage == NULL) || (_ofDict == NULL) || _systemPaniced) {
return kIOReturnNotReady;
}
buffer = tmpBuffer = IONew(UInt8, _ofPartitionSize);
- if (buffer == 0) {
+ if (buffer == NULL) {
return kIOReturnNoMemory;
}
bzero(buffer, _ofPartitionSize);
maxLength = _ofPartitionSize;
iter = OSCollectionIterator::withCollection(_ofDict);
- if (iter == 0) {
+ if (iter == NULL) {
ok = false;
}
while (ok) {
tmpSymbol = OSDynamicCast(OSSymbol, iter->getNextObject());
- if (tmpSymbol == 0) {
+ if (tmpSymbol == NULL) {
break;
}
return kIOReturnBadArgument;
}
- if (_nvramController != 0) {
+ if (_nvramController != NULL) {
return _nvramController->write(0, _nvramImage, kIODTNVRAMImageSize);
}
{"enter-tdm-mode", kOFVariableTypeBoolean, kOFVariablePermUserWrite, -1},
{"nonce-seeds", kOFVariableTypeData, kOFVariablePermKernelOnly, -1},
#endif
- {0, kOFVariableTypeData, kOFVariablePermUserRead, -1}
+ {NULL, kOFVariableTypeData, kOFVariablePermUserRead, -1}
};
UInt32
ofVar = gOFVariables;
while (1) {
- if ((ofVar->variableName == 0) ||
+ if ((ofVar->variableName == NULL) ||
propSymbol->isEqualTo(ofVar->variableName)) {
break;
}
ofVar = gOFVariables;
while (1) {
- if ((ofVar->variableName == 0) ||
+ if ((ofVar->variableName == NULL) ||
propSymbol->isEqualTo(ofVar->variableName)) {
break;
}
IODTNVRAM::getOWVariableInfo(UInt32 variableNumber, const OSSymbol **propSymbol,
UInt32 *propType, UInt32 *propOffset)
{
- const OFVariable *ofVar;
-
- ofVar = gOFVariables;
- while (1) {
- if (ofVar->variableName == 0) {
- return false;
- }
-
- if (ofVar->variableOffset == (SInt32) variableNumber) {
- break;
- }
-
- ofVar++;
- }
-
- *propSymbol = OSSymbol::withCStringNoCopy(ofVar->variableName);
- *propType = ofVar->variableType;
-
- switch (*propType) {
- case kOFVariableTypeBoolean:
- *propOffset = 1 << (31 - variableNumber);
- break;
-
- case kOFVariableTypeNumber:
- *propOffset = variableNumber - kOWVariableOffsetNumber;
- break;
-
- case kOFVariableTypeString:
- *propOffset = variableNumber - kOWVariableOffsetString;
- break;
- }
-
- return true;
+ /* UNSUPPORTED */
+ return false;
}
bool
propName[propNameLength] = '\0';
tmpSymbol = OSSymbol::withCString((const char *)propName);
propName[propNameLength] = '=';
- if (tmpSymbol == 0) {
+ if (tmpSymbol == NULL) {
return false;
}
propType = getOFVariableType(tmpSymbol);
// Create the object.
- tmpObject = 0;
+ tmpObject = NULL;
switch (propType) {
case kOFVariableTypeBoolean:
if (!strncmp("true", (const char *)propData, propDataLength)) {
break;
case kOFVariableTypeNumber:
- tmpNumber = OSNumber::withNumber(strtol((const char *)propData, 0, 0), 32);
- if (tmpNumber != 0) {
+ tmpNumber = OSNumber::withNumber(strtol((const char *)propData, NULL, 0), 32);
+ if (tmpNumber != NULL) {
tmpObject = tmpNumber;
}
break;
case kOFVariableTypeString:
tmpString = OSString::withCString((const char *)propData);
- if (tmpString != 0) {
+ if (tmpString != NULL) {
tmpObject = tmpString;
}
break;
break;
}
- if (tmpObject == 0) {
+ if (tmpObject == NULL) {
tmpSymbol->release();
return false;
}
const UInt8 *propName;
UInt32 propNameLength, propDataLength, remaining;
UInt32 propType, tmpValue;
- OSBoolean *tmpBoolean = 0;
- OSNumber *tmpNumber = 0;
- OSString *tmpString = 0;
- OSData *tmpData = 0;
+ OSBoolean *tmpBoolean = NULL;
+ OSNumber *tmpNumber = NULL;
+ OSString *tmpString = NULL;
+ OSData *tmpData = NULL;
propName = (const UInt8 *)propSymbol->getCStringNoCopy();
propNameLength = propSymbol->getLength();
switch (propType) {
case kOFVariableTypeBoolean:
tmpBoolean = OSDynamicCast(OSBoolean, propObject);
- if (tmpBoolean != 0) {
+ if (tmpBoolean != NULL) {
propDataLength = 5;
}
break;
case kOFVariableTypeNumber:
tmpNumber = OSDynamicCast(OSNumber, propObject);
- if (tmpNumber != 0) {
+ if (tmpNumber != NULL) {
propDataLength = 10;
}
break;
case kOFVariableTypeString:
tmpString = OSDynamicCast(OSString, propObject);
- if (tmpString != 0) {
+ if (tmpString != NULL) {
propDataLength = tmpString->getLength();
}
break;
case kOFVariableTypeData:
tmpData = OSDynamicCast(OSData, propObject);
- if (tmpData != 0) {
+ if (tmpData != NULL) {
tmpData = escapeDataToData(tmpData);
propDataLength = tmpData->getLength();
}
void
IODTNVRAM::updateOWBootArgs(const OSSymbol *key, OSObject *value)
{
- bool wasBootArgs, bootr = false;
- UInt32 cnt;
- OSString *tmpString, *bootCommand, *bootArgs = 0;
- const UInt8 *bootCommandData, *bootArgsData;
- UInt8 *tmpData;
- UInt32 bootCommandDataLength, bootArgsDataLength, tmpDataLength;
-
- tmpString = OSDynamicCast(OSString, value);
- if (tmpString == 0) {
- return;
- }
-
- if (key->isEqualTo("boot-command")) {
- wasBootArgs = false;
- bootCommand = tmpString;
- } else if (key->isEqualTo("boot-args")) {
- wasBootArgs = true;
- bootArgs = tmpString;
- bootCommand = OSDynamicCast(OSString, _ofDict->getObject("boot-command"));
- if (bootCommand == 0) {
- return;
- }
- } else {
- return;
- }
-
- bootCommandData = (const UInt8 *)bootCommand->getCStringNoCopy();
- bootCommandDataLength = bootCommand->getLength();
-
- if (bootCommandData == 0) {
- return;
- }
-
- for (cnt = 0; cnt < bootCommandDataLength; cnt++) {
- if ((bootCommandData[cnt] == 'b') &&
- !strncmp("bootr", (const char *)bootCommandData + cnt, 5)) {
- cnt += 5;
- while (bootCommandData[cnt] == ' ') {
- cnt++;
- }
- bootr = true;
- break;
- }
- }
- if (!bootr) {
- _ofDict->removeObject("boot-args");
- return;
- }
-
- if (wasBootArgs) {
- bootArgsData = (const UInt8 *)bootArgs->getCStringNoCopy();
- bootArgsDataLength = bootArgs->getLength();
- if (bootArgsData == 0) {
- return;
- }
-
- tmpDataLength = cnt + bootArgsDataLength;
- tmpData = IONew(UInt8, tmpDataLength + 1);
- if (tmpData == 0) {
- return;
- }
-
- cnt -= strlcpy((char *)tmpData, (const char *)bootCommandData, cnt);
- strlcat((char *)tmpData, (const char *)bootArgsData, cnt);
-
- bootCommand = OSString::withCString((const char *)tmpData);
- if (bootCommand != 0) {
- _ofDict->setObject("boot-command", bootCommand);
- bootCommand->release();
- }
-
- IODelete(tmpData, UInt8, tmpDataLength + 1);
- } else {
- bootArgs = OSString::withCString((const char *)(bootCommandData + cnt));
- if (bootArgs != 0) {
- _ofDict->setObject("boot-args", bootArgs);
- bootArgs->release();
- }
- }
+ /* UNSUPPORTED */
}
bool
OSData *
IODTNVRAM::unescapeBytesToData(const UInt8 *bytes, UInt32 length)
{
- OSData *data = 0;
+ OSData *data = NULL;
UInt32 totalLength = 0;
UInt32 cnt, cnt2;
UInt8 byte;
if (ok) {
// Create an empty OSData of the correct size.
data = OSData::withCapacity(totalLength);
- if (data != 0) {
+ if (data != NULL) {
for (cnt = 0; cnt < length;) {
byte = bytes[cnt++];
if (byte == 0xFF) {
if (!ok) {
result->release();
- result = 0;
+ result = NULL;
}
return result;
const UInt8 *startPtr;
const UInt8 *endPtr;
const UInt8 *wherePtr;
- const UInt8 *nvPath = 0;
- const char *nvName = 0;
- const char *resultName = 0;
- const UInt8 *resultValue = 0;
+ const UInt8 *nvPath = NULL;
+ const char *nvName = NULL;
+ const char *resultName = NULL;
+ const UInt8 *resultValue = NULL;
UInt32 resultValueLen = 0;
UInt8 byte;
- if (_ofDict == 0) {
+ if (_ofDict == NULL) {
return err;
}
data = OSDynamicCast(OSData, _ofDict->getObject(_registryPropertiesKey));
IOLockUnlock(_ofLock);
- if (data == 0) {
+ if (data == NULL) {
return err;
}
continue;
}
- if (nvPath == 0) {
+ if (nvPath == NULL) {
nvPath = startPtr;
- } else if (nvName == 0) {
+ } else if (nvName == NULL) {
nvName = (const char *) startPtr;
} else {
IORegistryEntry * compareEntry = IORegistryEntry::fromPath((const char *) nvPath, gIODTPlane);
break;
}
}
- nvPath = 0;
- nvName = 0;
+ nvPath = NULL;
+ nvName = NULL;
}
startPtr = wherePtr;
}
if (resultName) {
*name = OSSymbol::withCString(resultName);
*value = unescapeBytesToData(resultValue, resultValueLen);
- if ((*name != 0) && (*value != 0)) {
+ if ((*name != NULL) && (*value != NULL)) {
err = kIOReturnSuccess;
} else {
err = kIOReturnNoMemory;
OSData *value)
{
OSData *oldData, *escapedData;
- OSData *data = 0;
+ OSData *data = NULL;
const UInt8 *startPtr;
const UInt8 *propStart;
const UInt8 *endPtr;
const UInt8 *wherePtr;
- const UInt8 *nvPath = 0;
- const char *nvName = 0;
+ const UInt8 *nvPath = NULL;
+ const char *nvName = NULL;
const char * comp;
const char * name;
UInt8 byte;
bool ok = true;
bool settingAppleProp;
- if (_ofDict == 0) {
+ if (_ofDict == NULL) {
return kIOReturnNoResources;
}
if (byte) {
continue;
}
- if (nvPath == 0) {
+ if (nvPath == NULL) {
nvPath = startPtr;
- } else if (nvName == 0) {
+ } else if (nvName == NULL) {
nvName = (const char *) startPtr;
} else {
IORegistryEntry * compareEntry = IORegistryEntry::fromPath((const char *) nvPath, gIODTPlane);
break;
}
}
- nvPath = 0;
- nvName = 0;
+ nvPath = NULL;
+ nvName = NULL;
}
startPtr = wherePtr;
// append escaped data
escapedData = escapeDataToData(value);
- ok &= (escapedData != 0);
+ ok &= (escapedData != NULL);
if (ok) {
ok &= data->appendBytes(escapedData);
}