aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/dundi-parser.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 15:23:19 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 15:23:19 +0000
commitdac373f5395aca9a9f3f75b089e415ec6f0a51f4 (patch)
tree5c5be0ea22d3b81ee644e5f620052a4f25f14e02 /pbx/dundi-parser.c
parentb9f6c27beb072516a1bec8b7261b05ac902c2093 (diff)
Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it. It replaces a bunch of simple calls to snprintf with ast_copy_string (closes issue #10843) Reported by: Corydon76 Patches: 2007092900_10843.diff uploaded by mvanbaak (license 7) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84173 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/dundi-parser.c')
-rw-r--r--pbx/dundi-parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 14ef9e740..675ee941a 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -229,7 +229,7 @@ static void dump_int(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned int))
snprintf(output, maxlen, "%lu", (unsigned long)ntohl(*((unsigned int *)value)));
else
- snprintf(output, maxlen, "Invalid INT");
+ ast_copy_string(output, "Invalid INT", maxlen);
}
static void dump_short(char *output, int maxlen, void *value, int len)
@@ -237,7 +237,7 @@ static void dump_short(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned short))
snprintf(output, maxlen, "%d", ntohs(*((unsigned short *)value)));
else
- snprintf(output, maxlen, "Invalid SHORT");
+ ast_copy_string(output, "Invalid SHORT", maxlen);
}
static void dump_byte(char *output, int maxlen, void *value, int len)
@@ -245,7 +245,7 @@ static void dump_byte(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned char))
snprintf(output, maxlen, "%d", *((unsigned char *)value));
else
- snprintf(output, maxlen, "Invalid BYTE");
+ ast_copy_string(output, "Invalid BYTE", maxlen);
}
static char *proto2str(int proto, char *buf, int bufsiz)