diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-03-02 11:01:43 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-03-02 11:01:43 +0100 |
commit | 554a6fa760de47c497abcc91bb5f1f9b2756a407 (patch) | |
tree | f59b0c8ddd14dc414c952710b2010477107cde06 /nx-X11/programs/Xserver/hw/nxagent/Atoms.c | |
parent | f42d36fb73e096113a948a04279b752689f157bc (diff) | |
parent | 9c3669c6b7ff19013b3684bb74d98ec3d121e329 (diff) | |
download | nx-libs-554a6fa760de47c497abcc91bb5f1f9b2756a407.tar.gz nx-libs-554a6fa760de47c497abcc91bb5f1f9b2756a407.tar.bz2 nx-libs-554a6fa760de47c497abcc91bb5f1f9b2756a407.zip |
Merge branch 'sunweaver-pr/constify-atom-name-strings' into 3.6.x
Attributes GH PR #363: https://github.com/ArcticaProject/nx-libs/pull/363
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Atoms.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c index 8f43dce4d..0784d6c2c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c @@ -336,7 +336,7 @@ int nxagentQueryAtoms(ScreenPtr pScreen) typedef struct { Atom local; Atom remote; - char *string; + const char *string; int length; } AtomMap; @@ -345,7 +345,7 @@ static unsigned int privAtomMapSize = 0; static unsigned int privLastAtom = 0; static void nxagentExpandCache(void); -static void nxagentWriteAtom(Atom, Atom, char*, Bool); +static void nxagentWriteAtom(Atom, Atom, const char*, Bool); static AtomMap* nxagentFindAtomByRemoteValue(Atom); static AtomMap* nxagentFindAtomByLocalValue(Atom); static AtomMap* nxagentFindAtomByName(char*, unsigned); @@ -368,9 +368,9 @@ static void nxagentExpandCache(void) * then cache the atom-couple. */ -static void nxagentWriteAtom(Atom local, Atom remote, char *string, Bool duplicate) +static void nxagentWriteAtom(Atom local, Atom remote, const char *string, Bool duplicate) { - char *s; + const char *s; /* * We could remove this string duplication if @@ -460,7 +460,7 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet) for (i = 0; i < privLastAtom; i++) { - name_list[count + i] = privAtomMap[i].string; + name_list[count + i] = (char *)privAtomMap[i].string; atom_list[count + i] = None; } @@ -670,7 +670,7 @@ Atom nxagentMakeAtom(char *string, unsigned int length, Bool Makeit) Atom nxagentLocalToRemoteAtom(Atom local) { AtomMap *current; - char *string; + const char *string; Atom remote; if (!ValidAtom(local)) |