summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/png.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-24 12:57:58 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-24 12:58:31 +0200
commit89c5e1f681107b6d9f8ba7f761c388d1e2052fe4 (patch)
treec5ce4530d0c03fa1c04021844272b82b7b7ebcbc /src/lib/util/png.cpp
parentef0968b87042040e1f0e18c84ce804f744f8e23e (diff)
Various cleanups suggested by static analyzer (nw)
Diffstat (limited to 'src/lib/util/png.cpp')
-rw-r--r--src/lib/util/png.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 8023d350cdc..73c43e9cf90 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -312,7 +312,7 @@ static png_error process_chunk(png_private *png, UINT8 *data, UINT32 type, UINT3
text->next = nullptr;
/* add to the end of the list */
- for (pt = nullptr, ct = png->pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) ;
+ for (pt = nullptr, ct = png->pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) { }
if (pt == nullptr)
png->pnginfo->textlist = text;
else
@@ -726,13 +726,13 @@ png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text)
strcpy(textdata, keyword);
strcpy(textdata + keylen + 1, text);
- /* text follows a trailing NULL */
+ /* text follows a trailing nullptr */
newtext->keyword = textdata;
newtext->text = textdata + keylen + 1;
newtext->next = nullptr;
/* add us to the end of the linked list */
- for (pt = nullptr, ct = pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) ;
+ for (pt = nullptr, ct = pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) { }
if (pt == nullptr)
pnginfo->textlist = newtext;
else
@@ -905,7 +905,7 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
return PNGERR_OUT_OF_MEMORY;
}
- /* copy in the pixels, specifying a NULL filter */
+ /* copy in the pixels, specifying a nullptr filter */
for (y = 0; y < pnginfo->height; y++)
{
UINT16 *src = reinterpret_cast<UINT16 *>(bitmap.raw_pixptr(y));
@@ -944,7 +944,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &
if (pnginfo->image == nullptr)
return PNGERR_OUT_OF_MEMORY;
- /* copy in the pixels, specifying a NULL filter */
+ /* copy in the pixels, specifying a nullptr filter */
for (y = 0; y < pnginfo->height; y++)
{
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);