ref: ab4ca9ad8c3e7a590291e12b3e1b1011a3d279b3
parent: 3fb5648880bccdd52b627c137d18710b687d8e1f
author: ISSOtm <[email protected]>
date: Tue Jan 21 10:06:18 EST 2020
Make symbol ref in patch symbols constant
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -45,7 +45,7 @@
struct PatchSymbol {
uint32_t ID;
- struct sSymbol *pSymbol;
+ struct sSymbol const *pSymbol;
struct PatchSymbol *pNext;
struct PatchSymbol *pBucketNext; /* next symbol in hash table bucket */
};
@@ -186,7 +186,7 @@
/*
* Write a NULL-terminated string to a file
*/
-static void fputstring(char *s, FILE *f)
+static void fputstring(char const *s, FILE *f)
{
while (*s)
fputc(*s++, f);
@@ -259,7 +259,7 @@
/*
* Write a symbol to a file
*/
-static void writesymbol(struct sSymbol *pSym, FILE *f)
+static void writesymbol(struct sSymbol const *pSym, FILE *f)
{
uint32_t type;
uint32_t offset;
@@ -538,12 +538,12 @@
struct PatchSymbol *pSym = pPatchSymbols;
while (pSym) {
- struct sSymbol *pSymbol = pSym->pSymbol;
+ struct sSymbol const *pSymbol = pSym->pSymbol;
if (!(pSymbol->nType & SYMF_DEFINED)
&& pSymbol->nType & SYMF_LOCAL) {
- char *name = pSymbol->tzName;
- char *localPtr = strchr(name, '.');
+ char const *name = pSymbol->tzName;
+ char const *localPtr = strchr(name, '.');
if (localPtr)
name = localPtr;