aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-10-13 20:57:14 +0200
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:50 +0200
commita470de00099d3b8f44797cec29cc5ce95eec4f33 (patch)
tree048087298c242c7195c2d541d10bd240ce3d7523 /nx-X11/programs/Xserver/hw/nxagent/Atoms.h
parent204bbef0431933dce9eb0b8d4074d723a9f7345b (diff)
downloadnx-libs-a470de00099d3b8f44797cec29cc5ce95eec4f33.tar.gz
nx-libs-a470de00099d3b8f44797cec29cc5ce95eec4f33.tar.bz2
nx-libs-a470de00099d3b8f44797cec29cc5ce95eec4f33.zip
Atoms.c: ensure to always return a valid string...
... by providing NameFor(Int|Rem)Atom() macros This way we do not have to validate it at various other places.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Atoms.h')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Atoms.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
index 8fe79883c..4dcdf7055 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
@@ -84,10 +84,10 @@ XlibAtom nxagentLocalToRemoteAtom(Atom);
const char *nxagentRemoteAtomToString(XlibAtom remote);
/*
- * As nxagentRemoteAtomToString() is similar to NameForAtom() we
- * supply a macro for calling it.
+ * supply two macros that also validate the output.
*/
-#define NameForRemAtom(arg) nxagentRemoteAtomToString(arg)
+#define NameForIntAtom(_atom) validateString(NameForAtom(_atom))
+#define NameForRemAtom(_xlibatom) validateString(nxagentRemoteAtomToString(_xlibatom))
#endif /* XlibAtom */