projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: reset out_fd_offset when we rotate the trace file
[lttng-tools.git]
/
src
/
common
/
uri.c
diff --git
a/src/common/uri.c
b/src/common/uri.c
index e54eb387d14fefb0f1923cd1f01b4287fc8255ae..4838372ee9eadd0f6730af6e5d059bd45b35d11f 100644
(file)
--- a/
src/common/uri.c
+++ b/
src/common/uri.c
@@
-186,7
+186,7
@@
int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size)
{
int ipver, ret;
const char *addr;
{
int ipver, ret;
const char *addr;
- char proto[
4
], port[7];
+ char proto[
5
], port[7];
assert(uri);
assert(dst);
assert(uri);
assert(dst);
@@
-194,13
+194,13
@@
int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size)
if (uri->dtype == LTTNG_DST_PATH) {
ipver = 0;
addr = uri->dst.path;
if (uri->dtype == LTTNG_DST_PATH) {
ipver = 0;
addr = uri->dst.path;
- (void) snprintf(proto, sizeof(proto)
+ 1
, "file");
- (void) snprintf(port, sizeof(port)
+ 1
, "%s", "");
+ (void) snprintf(proto, sizeof(proto), "file");
+ (void) snprintf(port, sizeof(port), "%s", "");
} else {
ipver = (uri->dtype == LTTNG_DST_IPV4) ? 4 : 6;
addr = (ipver == 4) ? uri->dst.ipv4 : uri->dst.ipv6;
} else {
ipver = (uri->dtype == LTTNG_DST_IPV4) ? 4 : 6;
addr = (ipver == 4) ? uri->dst.ipv4 : uri->dst.ipv6;
- (void) snprintf(proto, sizeof(proto)
+ 1
, "net%d", ipver);
- (void) snprintf(port, sizeof(port)
+ 1
, ":%d", uri->port);
+ (void) snprintf(proto, sizeof(proto), "net%d", ipver);
+ (void) snprintf(port, sizeof(port), ":%d", uri->port);
}
ret = snprintf(dst, size, "%s://%s%s%s%s/%s", proto,
}
ret = snprintf(dst, size, "%s://%s%s%s%s/%s", proto,
This page took
0.025099 seconds
and
4
git commands to generate.