aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsserver/macros.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-01 01:58:01 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-01 01:58:01 +0200
commit68677103048a6be41d373e81fa2dcb422328fcee (patch)
treed3bde93d1ae52ea86c546490c03146404d821500 /src/libmdsserver/macros.h
parenttypo (diff)
downloadmds-68677103048a6be41d373e81fa2dcb422328fcee.tar.gz
mds-68677103048a6be41d373e81fa2dcb422328fcee.tar.bz2
mds-68677103048a6be41d373e81fa2dcb422328fcee.tar.xz
mds-kbdc: minor optimisation
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libmdsserver/macros.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libmdsserver/macros.h b/src/libmdsserver/macros.h
index f17da94..f177c1e 100644
--- a/src/libmdsserver/macros.h
+++ b/src/libmdsserver/macros.h
@@ -726,6 +726,19 @@
/**
+ * The way to get a pointer to the end of a string
+ *
+ * `strchr(str, '\0')` is faster than `str + strlen(str)`,
+ * at least in the GNU C Library. If this is not true for
+ * the compiler you are using, you may want to edit this
+ * macro.
+ */
+#define STREND(str) \
+ (strchr(str, '\0'))
+/* TODO Document STREND in the texinfo manual. */
+
+
+/**
* The system is running out of memory.
* Quick, free up all your unused memory or kill yourself!
*/