]> git.lttng.org Git - lttng-tools.git/commitdiff
Clean-up: lttng-relayd: Correct variable name typo
authorKienan Stewart <kstewart@efficios.com>
Tue, 29 Oct 2024 15:31:37 +0000 (15:31 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 Dec 2024 15:52:55 +0000 (15:52 +0000)
Change-Id: Id62a4e621c3e1d1cd138f85903143b7acd1197fb
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/live.cpp

index 3857fbced8693d44b02d350df6e586d29700dab6..b262580f0024f4a25d16e6cde203ecbc987488c1 100644 (file)
@@ -756,7 +756,7 @@ static struct lttcomm_sock *init_socket(struct lttng_uri *uri, const char *name)
        int ret, sock_fd;
        struct lttcomm_sock *sock = nullptr;
        char uri_str[LTTNG_PATH_MAX];
-       char *formated_name = nullptr;
+       char *formatted_name = nullptr;
 
        sock = lttcomm_alloc_sock_from_uri(uri);
        if (sock == nullptr) {
@@ -771,21 +771,21 @@ static struct lttcomm_sock *init_socket(struct lttng_uri *uri, const char *name)
        ret = uri_to_str_url(uri, uri_str, sizeof(uri_str));
        uri_str[sizeof(uri_str) - 1] = '\0';
        if (ret >= 0) {
-               ret = asprintf(&formated_name, "%s socket @ %s", name, uri_str);
+               ret = asprintf(&formatted_name, "%s socket @ %s", name, uri_str);
                if (ret < 0) {
-                       formated_name = nullptr;
+                       formatted_name = nullptr;
                }
        }
 
        ret = fd_tracker_open_unsuspendable_fd(the_fd_tracker,
                                               &sock_fd,
-                                              (const char **) (formated_name ? &formated_name :
+                                              (const char **) (formatted_name ? &formatted_name :
                                                                                nullptr),
                                               1,
                                               create_sock,
                                               sock);
        if (ret) {
-               PERROR("Failed to create \"%s\" socket", formated_name ?: "Unknown");
+               PERROR("Failed to create \"%s\" socket", formatted_name ?: "Unknown");
                goto error;
        }
        DBG("Listening on %s socket %d", name, sock->fd);
@@ -801,14 +801,14 @@ static struct lttcomm_sock *init_socket(struct lttng_uri *uri, const char *name)
                goto error;
        }
 
-       free(formated_name);
+       free(formatted_name);
        return sock;
 
 error:
        if (sock) {
                lttcomm_destroy_sock(sock);
        }
-       free(formated_name);
+       free(formatted_name);
        return nullptr;
 }
 
This page took 0.0311 seconds and 4 git commands to generate.