zehortigoza pushed a commit to branch master.
commit f3eb2bfa4a1e98a3ff52ad046c56332e49d89f3d
Author: Mike Blumenkrantz <[email protected]>
Date: Wed Jun 19 11:09:01 2013 +0100
use sizeof for eldbus-codegen internal define lengths
---
src/codegen/parser.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/codegen/parser.c b/src/codegen/parser.c
index 7ed0dfe..9f4081f 100644
--- a/src/codegen/parser.c
+++ b/src/codegen/parser.c
@@ -1,19 +1,19 @@
#include "codegen.h"
#define OBJECT_TAG "node"
-#define OBJECT_TAG_LENGTH strlen(OBJECT_TAG)
+#define OBJECT_TAG_LENGTH sizeof(OBJECT_TAG) - 1
#define INTERFACE_TAG "interface"
-#define INTERFACE_TAG_LENGTH strlen(INTERFACE_TAG)
+#define INTERFACE_TAG_LENGTH sizeof(INTERFACE_TAG) - 1
#define SIGNAL_TAG "signal"
-#define SIGNAL_TAG_LENGTH strlen(SIGNAL_TAG)
+#define SIGNAL_TAG_LENGTH sizeof(SIGNAL_TAG) - 1
#define METHOD_TAG "method"
-#define METHOD_TAG_LENGTH strlen(METHOD_TAG)
+#define METHOD_TAG_LENGTH sizeof(METHOD_TAG) - 1
#define PROPERTY_TAG "property"
-#define PROPERTY_TAG_LENGTH strlen(PROPERTY_TAG)
+#define PROPERTY_TAG_LENGTH sizeof(PROPERTY_TAG) - 1
#define ARG_TAG "arg"
-#define ARG_TAG_LENGTH strlen(ARG_TAG)
+#define ARG_TAG_LENGTH sizeof(ARG_TAG) - 1
#define ANNOTATION_TAG "annotation"
-#define ANNOTATION_TAG_LENGTH strlen(ANNOTATION_TAG)
+#define ANNOTATION_TAG_LENGTH sizeof(ANNOTATION_TAG) - 1
//attributes
#define NAME_ATTR "name"
--
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk