summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 20:36:57 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 21:32:41 +0100
commit12764781c6053898925484dee07e71a52abc4f26 (patch)
tree3f89294c8053770ac4e1e4769bfd28a234554ee6 /rbutil/rbutilqt/base/bootloaderinstalltcc.cpp
parentf608de723c863abc0e32cd7584c046eceb910d78 (diff)
downloadrockbox-12764781c6053898925484dee07e71a52abc4f26.tar.gz
rockbox-12764781c6053898925484dee07e71a52abc4f26.zip
rbutil: Modernize code to use C++11 nullptr.
Change-Id: I112cf95122a896cdb30a823b4c1f49831273dc7e
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstalltcc.cpp')
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstalltcc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp b/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp
index e0bfbe3cf2..1551d7c45d 100644
--- a/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp
@@ -57,7 +57,7 @@ bool BootloaderInstallTcc::install(void)
57 57
58void BootloaderInstallTcc::installStage2(void) 58void BootloaderInstallTcc::installStage2(void)
59{ 59{
60 unsigned char *of_buf, *boot_buf = NULL, *patched_buf = NULL; 60 unsigned char *of_buf, *boot_buf = nullptr, *patched_buf = nullptr;
61 int n, of_size, boot_size, patched_size; 61 int n, of_size, boot_size, patched_size;
62 char errstr[200]; 62 char errstr[200];
63 bool ret = false; 63 bool ret = false;
@@ -76,7 +76,7 @@ void BootloaderInstallTcc::installStage2(void)
76 76
77 /* Load original firmware file */ 77 /* Load original firmware file */
78 of_buf = file_read(m_offile.toLocal8Bit().data(), &of_size); 78 of_buf = file_read(m_offile.toLocal8Bit().data(), &of_size);
79 if (of_buf == NULL) 79 if (of_buf == nullptr)
80 { 80 {
81 emit logItem(errstr, LOGERROR); 81 emit logItem(errstr, LOGERROR);
82 emit logItem(tr("Could not load %1").arg(m_offile), LOGERROR); 82 emit logItem(tr("Could not load %1").arg(m_offile), LOGERROR);
@@ -93,7 +93,7 @@ void BootloaderInstallTcc::installStage2(void)
93 93
94 /* Load bootloader file */ 94 /* Load bootloader file */
95 boot_buf = file_read(bootfile.toLocal8Bit().data(), &boot_size); 95 boot_buf = file_read(bootfile.toLocal8Bit().data(), &boot_size);
96 if (boot_buf == NULL) 96 if (boot_buf == nullptr)
97 { 97 {
98 emit logItem(errstr, LOGERROR); 98 emit logItem(errstr, LOGERROR);
99 emit logItem(tr("Could not load %1").arg(bootfile), LOGERROR); 99 emit logItem(tr("Could not load %1").arg(bootfile), LOGERROR);
@@ -105,7 +105,7 @@ void BootloaderInstallTcc::installStage2(void)
105 105
106 patched_buf = patch_firmware_tcc(of_buf, of_size, boot_buf, boot_size, 106 patched_buf = patch_firmware_tcc(of_buf, of_size, boot_buf, boot_size,
107 &patched_size); 107 &patched_size);
108 if (patched_buf == NULL) 108 if (patched_buf == nullptr)
109 { 109 {
110 emit logItem(errstr, LOGERROR); 110 emit logItem(errstr, LOGERROR);
111 emit logItem(tr("Could not patch firmware"), LOGERROR); 111 emit logItem(tr("Could not patch firmware"), LOGERROR);