Fix: return value signedness
authorDavid Goulet <dgoulet@efficios.com>
Tue, 3 Apr 2012 18:29:01 +0000 (14:29 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 3 Apr 2012 18:33:19 +0000 (14:33 -0400)
Also remove repeated include headers.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/session.c
src/bin/lttng-sessiond/session.h
src/bin/lttng-sessiond/trace-kernel.h
src/bin/lttng-sessiond/trace-ust.c
src/bin/lttng-sessiond/trace-ust.h

index cf2ef463e8ce20404746ae7dda5a28e44f538b84..bcdd78d50e68b921f47ceb4038311c625aee875d 100644 (file)
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <urcu.h>
 
 #include <common/common.h>
@@ -55,7 +54,7 @@ static struct ltt_session_list ltt_session_list = {
  * The caller MUST acquire the session list lock before.
  * Returns the unique identifier for the session.
  */
-static int add_session_list(struct ltt_session *ls)
+static unsigned int add_session_list(struct ltt_session *ls)
 {
        cds_list_add(&ls->list, &ltt_session_list.head);
        return ++ltt_session_list.count;
@@ -230,7 +229,7 @@ int session_create(char *name, char *path, uid_t uid, gid_t gid)
        new_session->id = add_session_list(new_session);
        session_unlock_list();
 
-       DBG("Tracing session %s created in %s with ID %d by UID %d GID %d",
+       DBG("Tracing session %s created in %s with ID %u by UID %d GID %d",
                name, path, new_session->id,
                new_session->uid, new_session->gid);
 
index fd8f9116d21585d46fb1ac541272b397759cb293..8294a83fdc0d9852f4f91276a46ae295d251c42a 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef _LTT_SESSION_H
 #define _LTT_SESSION_H
 
-#include <pthread.h>
-#include <unistd.h>
 #include <urcu/list.h>
 
 #include "trace-kernel.h"
@@ -68,7 +66,7 @@ struct ltt_session {
        pthread_mutex_t lock;
        struct cds_list_head list;
        int enabled;    /* enabled/started flag */
-       int id;         /* session unique identifier */
+       unsigned int id;                /* session unique identifier */
        /* UID/GID of the user owning the session */
        uid_t uid;
        gid_t gid;
index 5a8bcdbd4418c496ab3aa72fcb931c179814d71f..d6f67265e2b0c38b857518e9531c725b86411096 100644 (file)
@@ -18,7 +18,6 @@
 #ifndef _LTT_TRACE_KERNEL_H
 #define _LTT_TRACE_KERNEL_H
 
-#include <limits.h>
 #include <urcu/list.h>
 
 #include <lttng/lttng.h>
index 7b5c3c788e4ff622a18d74f7fc2ce01555483359..c8b3b72f91ca3343a9a507dd343d5447ea6eb323 100644 (file)
@@ -85,8 +85,8 @@ error:
  *
  * Return pointer to structure or NULL.
  */
-struct ltt_ust_session *trace_ust_create_session(char *path, int session_id,
-               struct lttng_domain *domain)
+struct ltt_ust_session *trace_ust_create_session(char *path,
+               unsigned int session_id, struct lttng_domain *domain)
 {
        int ret;
        struct ltt_ust_session *lus;
@@ -544,7 +544,7 @@ void trace_ust_destroy_session(struct ltt_ust_session *session)
 
        rcu_read_lock();
 
-       DBG2("Trace UST destroy session %d", session->id);
+       DBG2("Trace UST destroy session %u", session->id);
 
        /* Cleaning up UST domain */
        destroy_domain_global(&session->domain_global);
index 4513bafee6847581aa0f401a52cd17f880028b85..c59490b2a7816bb3f9bf6244f5b69e66b596b738 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <config.h>
 #include <limits.h>
-#include <urcu.h>
 #include <urcu/list.h>
 
 #include <lttng/lttng.h>
@@ -127,8 +126,8 @@ struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
 /*
  * Create functions malloc() the data structure.
  */
-struct ltt_ust_session *trace_ust_create_session(char *path, int session_id,
-               struct lttng_domain *domain);
+struct ltt_ust_session *trace_ust_create_session(char *path,
+               unsigned int session_id, struct lttng_domain *domain);
 struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr,
                char *path);
 struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev);
This page took 0.029591 seconds and 4 git commands to generate.