summaryrefslogtreecommitdiffstats
path: root/Source/cmHexFileConverter.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-27 20:44:16 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-28 13:02:26 (GMT)
commit1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb (patch)
tree3c13e63f2529d877b865475b5269a96ef5e0a4cb /Source/cmHexFileConverter.cxx
parentb4b73f56a26c1e1d630e3f262d2d4bafee8231c4 (diff)
downloadCMake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.zip
CMake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.tar.gz
CMake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.tar.bz2
use CM_NULLPTR
Diffstat (limited to 'Source/cmHexFileConverter.cxx')
-rw-r--r--Source/cmHexFileConverter.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx
index 9609e95..34fd626 100644
--- a/Source/cmHexFileConverter.cxx
+++ b/Source/cmHexFileConverter.cxx
@@ -28,7 +28,7 @@ static bool cm_IsHexChar(char c)
static unsigned int ChompStrlen(const char* line)
{
- if (line == 0) {
+ if (line == CM_NULLPTR) {
return 0;
}
unsigned int length = static_cast<unsigned int>(strlen(line));
@@ -144,7 +144,7 @@ cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType(
{
char buf[1024];
FILE* inFile = cmsys::SystemTools::Fopen(inFileName, "rb");
- if (inFile == 0) {
+ if (inFile == CM_NULLPTR) {
return Binary;
}
@@ -193,11 +193,11 @@ bool cmHexFileConverter::TryConvert(const char* inFileName,
// try to open the file
FILE* inFile = cmsys::SystemTools::Fopen(inFileName, "rb");
FILE* outFile = cmsys::SystemTools::Fopen(outFileName, "wb");
- if ((inFile == 0) || (outFile == 0)) {
- if (inFile != 0) {
+ if ((inFile == CM_NULLPTR) || (outFile == CM_NULLPTR)) {
+ if (inFile != CM_NULLPTR) {
fclose(inFile);
}
- if (outFile != 0) {
+ if (outFile != CM_NULLPTR) {
fclose(outFile);
}
return false;
@@ -206,7 +206,7 @@ bool cmHexFileConverter::TryConvert(const char* inFileName,
// convert them line by line
bool success = false;
char buf[1024];
- while (fgets(buf, 1024, inFile) != 0) {
+ while (fgets(buf, 1024, inFile) != CM_NULLPTR) {
if (type == MotorolaSrec) {
success = ConvertMotorolaSrecLine(buf, outFile);
} else if (type == IntelHex) {