projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add type-checked versions of allocation and deallocations functions
[lttng-tools.git]
/
src
/
common
/
uri.cpp
diff --git
a/src/common/uri.cpp
b/src/common/uri.cpp
index b15fe25db9aca76a27127f753ca05df65ac463ad..8e663c46a732116b84c9e5c20615c6c018354034 100644
(file)
--- a/
src/common/uri.cpp
+++ b/
src/common/uri.cpp
@@
-306,7
+306,7
@@
ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris)
}
/* Allocate URI array */
}
/* Allocate URI array */
- tmp_uris =
(lttng_uri *) zmalloc(sizeof(struct lttng_uri) *
size);
+ tmp_uris =
calloc<lttng_uri>(
size);
if (tmp_uris == NULL) {
PERROR("zmalloc uri");
goto error;
if (tmp_uris == NULL) {
PERROR("zmalloc uri");
goto error;
@@
-634,7
+634,7
@@
ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url,
goto error;
}
goto error;
}
- tmp_uris =
(lttng_uri *) zmalloc(sizeof(struct lttng_uri) *
uri_count);
+ tmp_uris =
calloc<lttng_uri>(
uri_count);
if (tmp_uris == NULL) {
PERROR("zmalloc uris");
goto error;
if (tmp_uris == NULL) {
PERROR("zmalloc uris");
goto error;
This page took
0.023578 seconds
and
4
git commands to generate.