projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: sessiond: rename public accessors
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
modprobe.cpp
diff --git
a/src/bin/lttng-sessiond/modprobe.cpp
b/src/bin/lttng-sessiond/modprobe.cpp
index 782dcc6b2714d334b0397cdee548abd0d83642a9..90ed3ff14479b43a9dcdbf43ad5440358d311923 100644
(file)
--- a/
src/bin/lttng-sessiond/modprobe.cpp
+++ b/
src/bin/lttng-sessiond/modprobe.cpp
@@
-18,12
+18,12
@@
#include <stdlib.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/wait.h>
-#include <common/common.h>
-#include <common/utils.h>
+#include <common/common.h
pp
>
+#include <common/utils.h
pp
>
-#include "modprobe.h"
-#include "kern-modules.h"
-#include "lttng-sessiond.h"
+#include "modprobe.h
pp
"
+#include "kern-modules.h
pp
"
+#include "lttng-sessiond.h
pp
"
/* LTTng kernel tracer mandatory core modules list */
struct kern_modules_param kern_modules_control_core[] = {
/* LTTng kernel tracer mandatory core modules list */
struct kern_modules_param kern_modules_control_core[] = {
@@
-666,7
+666,7
@@
static int grow_probes(void)
/* Initialize capacity to 1 if 0. */
if (probes_capacity == 0) {
/* Initialize capacity to 1 if 0. */
if (probes_capacity == 0) {
- probes =
(kern_modules_param *) zmalloc(sizeof(*probes)
);
+ probes =
zmalloc<kern_modules_param>(
);
if (!probes) {
PERROR("malloc probe list");
return -ENOMEM;
if (!probes) {
PERROR("malloc probe list");
return -ENOMEM;
@@
-679,7
+679,7
@@
static int grow_probes(void)
/* Double size. */
probes_capacity *= 2;
/* Double size. */
probes_capacity *= 2;
- tmp_probes =
(kern_modules_param *) zmalloc(sizeof(*tmp_probes) *
probes_capacity);
+ tmp_probes =
calloc<kern_modules_param>(
probes_capacity);
if (!tmp_probes) {
PERROR("malloc probe list");
return -ENOMEM;
if (!tmp_probes) {
PERROR("malloc probe list");
return -ENOMEM;
@@
-741,7
+741,7
@@
static int append_list_to_probes(const char *list)
name_len = strlen(next) + 13;
cur_mod = &probes[nr_probes];
name_len = strlen(next) + 13;
cur_mod = &probes[nr_probes];
- cur_mod->name =
(char *) zmalloc
(name_len);
+ cur_mod->name =
calloc<char>
(name_len);
if (!cur_mod->name) {
PERROR("malloc probe list");
ret = -ENOMEM;
if (!cur_mod->name) {
PERROR("malloc probe list");
ret = -ENOMEM;
@@
-792,7
+792,7
@@
int modprobe_lttng_data(void)
/* Default probes. */
int def_len = ARRAY_SIZE(kern_modules_probes_default);
/* Default probes. */
int def_len = ARRAY_SIZE(kern_modules_probes_default);
- probes =
(kern_modules_param *) zmalloc(sizeof(*probes) *
def_len);
+ probes =
calloc<kern_modules_param>(
def_len);
if (!probes) {
PERROR("malloc probe list");
return -ENOMEM;
if (!probes) {
PERROR("malloc probe list");
return -ENOMEM;
This page took
0.025475 seconds
and
4
git commands to generate.