aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-12-30 00:57:46 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-12-30 00:57:46 +0000
commit95e50279ab9088d1df3f6caf38bf022fc46c1227 (patch)
tree4514f718490482ab47dbf2e08998bbee8f755f79
parentb7817c4e373658926f65db94317b8226200b6ebd (diff)
since all callers to fvalue_set for FT_STRING[Z] use already_copied==FALSE we now assert that this is the case in ftype-string.c and no longer have a conditional whetehr to create a local copy or not.
svn path=/trunk/; revision=20246
-rw-r--r--epan/ftypes/ftype-string.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/ftypes/ftype-string.c b/epan/ftypes/ftype-string.c
index b24086363c..57d13f8cde 100644
--- a/epan/ftypes/ftype-string.c
+++ b/epan/ftypes/ftype-string.c
@@ -55,16 +55,12 @@ static void
string_fvalue_set(fvalue_t *fv, gpointer value, gboolean already_copied)
{
DISSECTOR_ASSERT(value != NULL);
+ DISSECTOR_ASSERT(!already_copied);
/* Free up the old value, if we have one */
string_fvalue_free(fv);
- if (already_copied) {
- fv->value.string = value;
- }
- else {
- fv->value.string = g_strdup(value);
- }
+ fv->value.string = g_strdup(value);
}
static int