X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Furi.c;h=a2a5038deb54d39df0aabe297af11b0644fa6005;hp=380e75dd33b4839b144181c35f341a2724ef0f4e;hb=7aa6679a7ac0f0935dfbe63f43f1901bc2395b16;hpb=16aa84a9d47e500a29ed06c929600aa2117a6e80 diff --git a/src/common/uri.c b/src/common/uri.c index 380e75dd3..a2a5038de 100644 --- a/src/common/uri.c +++ b/src/common/uri.c @@ -61,7 +61,7 @@ static const struct uri_proto proto_uri[] = { * Return pointer to the character in s matching one of the characters in * accept. If nothing is found, return pointer to the end of string (eos). */ -static const inline char *strpbrk_or_eos(const char *s, const char *accept) +static inline const char *strpbrk_or_eos(const char *s, const char *accept) { char *p = strpbrk(s, accept); if (p == NULL) { @@ -608,7 +608,7 @@ ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url, if (ctrl_uris[0].dtype == LTTNG_DST_PATH && (data_url && *data_url != '\0')) { - ERR("Can not have a data URL when destination is file://"); + ERR("Cannot have a data URL when destination is file://"); goto error; } @@ -644,10 +644,12 @@ ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url, set_default_uri_attr(&data_uris[0], LTTNG_STREAM_DATA); - ret = compare_destination(&ctrl_uris[0], &data_uris[0]); - if (ret != 0) { - ERR("Control and data destination mismatch"); - goto error; + if (ctrl_uris) { + ret = compare_destination(&ctrl_uris[0], &data_uris[0]); + if (ret != 0) { + ERR("Control and data destination mismatch"); + goto error; + } } }