[telepathy-mission-control/master] McdDispatchOperation: use g_str_has_prefix rather than strncmp for clarity
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed May 20 02:12:50 PDT 2009
---
src/mcd-dispatch-operation.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index b38432b..111ab1e 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -637,8 +637,7 @@ mcd_dispatch_operation_handle_with (McdDispatchOperation *operation,
if (handler_path != NULL && handler_path[0] != '\0')
{
- if (strncmp (handler_path, MCD_CLIENT_BASE_NAME,
- MCD_CLIENT_BASE_NAME_LEN) != 0)
+ if (!g_str_has_prefix (handler_path, MCD_CLIENT_BASE_NAME))
{
DEBUG ("InvalidArgument: handler name %s is bad", handler_path);
g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
--
1.5.6.5
More information about the telepathy-commits
mailing list