From cc458a96937cc35abacb7c1b22654e194ac76b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Fri, 31 May 2019 12:34:14 +0100 Subject: [PATCH] Fix a few checkpatch issues --- src/asm/symbol.c | 1 - src/gfx/makepng.c | 4 ++-- src/link/assign.c | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/asm/symbol.c b/src/asm/symbol.c index b8c14ba5..60431c0a 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -497,7 +497,6 @@ void sym_AddEqu(char *tzSym, int32_t value) nsym->pScope = NULL; updateSymbolFilename(nsym); } - } /* diff --git a/src/gfx/makepng.c b/src/gfx/makepng.c index 38f54d4c..e5e78055 100644 --- a/src/gfx/makepng.c +++ b/src/gfx/makepng.c @@ -199,8 +199,8 @@ static struct RawIndexedImage *indexed_png_to_raw(struct PNGImage *img) raw_image = create_raw_image(img->width, img->height, colors); /* - * Transparent palette entries are removed, and the palette is collapsed. - * Transparent pixels are then replaced with palette index 0. + * Transparent palette entries are removed, and the palette is + * collapsed. Transparent pixels are then replaced with palette index 0. * This way, an indexed PNG can contain transparent pixels in *addition* * to 4 normal colors. */ diff --git a/src/link/assign.c b/src/link/assign.c index 8c3b0bec..0d4ccbf5 100644 --- a/src/link/assign.c +++ b/src/link/assign.c @@ -695,22 +695,22 @@ void CreateSymbolTable(void) if ((tSymbol->Type == SYM_EXPORT) && ((tSymbol->pSection == pSect) || (tSymbol->pSection == NULL))) { - if (tSymbol->pSection == NULL) - sym_CreateSymbol( - tSymbol->pzName, - tSymbol->nOffset, - -1, - tSymbol->pzObjFileName, - tSymbol->pzFileName, - tSymbol->nFileLine); - else - sym_CreateSymbol( - tSymbol->pzName, - pSect->nOrg + tSymbol->nOffset, - pSect->nBank, - tSymbol->pzObjFileName, - tSymbol->pzFileName, - tSymbol->nFileLine); + if (tSymbol->pSection == NULL) { + sym_CreateSymbol(tSymbol->pzName, + tSymbol->nOffset, + -1, + tSymbol->pzObjFileName, + tSymbol->pzFileName, + tSymbol->nFileLine); + } else { + sym_CreateSymbol(tSymbol->pzName, + pSect->nOrg + + tSymbol->nOffset, + pSect->nBank, + tSymbol->pzObjFileName, + tSymbol->pzFileName, + tSymbol->nFileLine); + } } } pSect = pSect->pNext;