aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dof.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-05 22:24:47 -0400
committerJaap Keuter <jaap.keuter@xs4all.nl>2016-06-06 06:03:58 +0000
commit57ef06e242dbbce390547d9711f810fc60829219 (patch)
treeeaadf36f96023dd59c3fd56565bf6e14c9e57431 /epan/dissectors/packet-dof.c
parent6333b98ea6f7733b150537cbba6f80f3e2d83d43 (diff)
*_stdup_printf -> strdup for "single string only" formatting.
Done for performance improvements. This could probably be done in checkAPIs.pl, but this was just a quick manual check with grepping. Change-Id: I91ff102cb528bb00fa2f65489de53890e7e46f2d Reviewed-on: https://code.wireshark.org/review/15751 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Diffstat (limited to 'epan/dissectors/packet-dof.c')
-rw-r--r--epan/dissectors/packet-dof.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-dof.c b/epan/dissectors/packet-dof.c
index 0bb31b2fa8..e3d1fcef8b 100644
--- a/epan/dissectors/packet-dof.c
+++ b/epan/dissectors/packet-dof.c
@@ -3365,30 +3365,30 @@ static void secmode_list_update_cb(void *r, const char **err)
size = (guint32)strlen(rec->domain);
if (!VALIDHEX(rec->domain[0]) && !dof_oid_create_internal(rec->domain, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
else if (!count_hex_bytes(rec->domain))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
size = (guint32)strlen(rec->identity);
if (!VALIDHEX(rec->identity[0]) && !dof_oid_create_internal(rec->identity, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
else if (!count_hex_bytes(rec->identity))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
if (count_hex_bytes(rec->kek) != 32)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid KEK [must be 32 byte key].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid KEK [must be 32 byte key].");
return;
}
}
@@ -3455,7 +3455,7 @@ static void seckey_list_update_cb(void *r, const char **err)
*err = NULL;
if (count_hex_bytes(rec->key) != 32)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid secret [must be 32 bytes].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid secret [must be 32 bytes].");
return;
}
}
@@ -3507,13 +3507,13 @@ static void identsecret_list_update_cb(void *r, const char **err)
{
if (dof_oid_create_internal(rec->domain, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
}
else if (!count_hex_bytes(rec->domain))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
@@ -3522,19 +3522,19 @@ static void identsecret_list_update_cb(void *r, const char **err)
{
if (dof_oid_create_internal(rec->identity, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
}
else if (!count_hex_bytes(rec->identity))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
if (count_hex_bytes(rec->secret) != 32)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid secret [must be 32 byte key].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid secret [must be 32 byte key].");
return;
}
}
@@ -3719,7 +3719,7 @@ static gboolean identsecret_chk_cb(void *r _U_, const char *p _U_, unsigned len
if (!num_protos)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "No protocols given");
+ *err = wmem_strdup(wmem_packet_scope(), "No protocols given");
return FALSE;
}