aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-03 04:31:11 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-03 04:31:11 +0000
commitaab049c3b2e7b0a93b2fdb4736abd4ba51118e34 (patch)
tree777948b3d8cb0bdfe1cd9f1894e07562ff9fa73c
parent319af26c0c2878e7f9fca0ab56fc7716648c69ea (diff)
Add include/asterisk/utils.h file. Which includes the function
ast_strlen_zero, which should be used instead of strlen to check if a string has length or doesn't have length. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2868 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xinclude/asterisk/utils.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
new file mode 100755
index 000000000..18863e880
--- /dev/null
+++ b/include/asterisk/utils.h
@@ -0,0 +1,20 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Utility functions
+ *
+ * Copyright (C) 2004, Digium
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
+#ifndef _ASTERISK_UTIL_H
+#define _ASTERISK_UTIL_H
+
+static inline int ast_strlen_zero(const char *s)
+{
+ return (*s == '\0');
+}
+
+#endif