summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-23 04:02:02 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-23 04:02:02 +0100
commit76b338fe3244b5249f5559f417ac2a3a0dd0355e (patch)
tree39cf3de52adcd2e5e5b9ec7f3a4d740bf76df343
parentda9f2079daa1e1ae30718ca5cb6d8d38c8a044c7 (diff)
Fix variable declaration after statements
-rw-r--r--common/sdp-xml.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/sdp-xml.c b/common/sdp-xml.c
index eac88bf1..e645b82f 100644
--- a/common/sdp-xml.c
+++ b/common/sdp-xml.c
@@ -232,10 +232,11 @@ static void convert_raw_data_to_xml(sdp_data_t *value, int indent_level,
case SDP_TEXT_STR16:
case SDP_TEXT_STR32:
{
- hex = 0;
-
int num_chars_to_escape = 0;
int length = value->unitSize - 1;
+ char *strBuf = 0;
+
+ hex = 0;
for (i = 0; i < length; i++) {
if (value->val.str[i] == '\0')
@@ -257,8 +258,6 @@ static void convert_raw_data_to_xml(sdp_data_t *value, int indent_level,
appender(data, "<text ");
- char *strBuf = 0;
-
if (hex) {
appender(data, "encoding=\"hex\" ");
strBuf = (char *) malloc(sizeof(char)