Skip to content

Commit

Permalink
Cleanup: src.ctf.lttng-live: add missing #include <stdint.h>
Browse files Browse the repository at this point in the history
Use stdint.h whenever only uint*_t are need and inttypes.h when
printf-like identifier are need (e.g. %PRIu64).

And reorder some #include statements.

Signed-off-by: Francis Deslauriers <[email protected]>
Change-Id: Ic69636e4ac316a86f88ba0bdd8ad435b38db0e6a
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2313
  • Loading branch information
frdeso authored and jgalar committed Nov 1, 2019
1 parent 31ee216 commit 28fb42b
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 18 deletions.
9 changes: 5 additions & 4 deletions src/plugins/ctf/lttng-live/data-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@
#define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE/DS"
#include "logging/comp-logging.h"

#include <inttypes.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>

#include <glib.h>
#include <inttypes.h>
#include "compat/mman.h"

#include <babeltrace2/babeltrace.h>

#include "../common/msg-iter/msg-iter.h"
#include "common/assert.h"

#include "compat/mman.h"
#include "data-stream.h"

#define STREAM_NAME_PREFIX "stream-"
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/ctf/lttng-live/data-stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
*/

#include <stdio.h>
#include <stdint.h>

#include <glib.h>
#include "common/macros.h"
#include <babeltrace2/babeltrace.h>

#include "lttng-live.h"
#include "../common/msg-iter/msg-iter.h"
#include "lttng-live.h"

enum lttng_live_iterator_status lttng_live_lazy_msg_init(
struct lttng_live_session *session);
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/ctf/lttng-live/lttng-live.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
#define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE"
#include "logging/comp-logging.h"

#include <glib.h>
#include <inttypes.h>
#include <stdbool.h>
#include <unistd.h>

#include <glib.h>

#include "common/assert.h"
#include <babeltrace2/babeltrace.h>
#include "compat/compiler.h"
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/ctf/lttng-live/lttng-live.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
*/

#include <stdbool.h>
#include <stdint.h>

#include <glib.h>

#include "common/macros.h"
#include <babeltrace2/babeltrace.h>

#include "common/macros.h"
#include "../common/metadata/decoder.h"
#include "../common/msg-iter/msg-iter.h"

#include "viewer-connection.h"

struct lttng_live_component;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/ctf/lttng-live/lttng-viewer-abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* SOFTWARE.
*/

#include <stdint.h>
#include "compat/limits.h"

#define LTTNG_VIEWER_PATH_MAX 4096
Expand Down
5 changes: 2 additions & 3 deletions src/plugins/ctf/lttng-live/metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
* SOFTWARE.
*/

#include <stdint.h>
#include <stdio.h>
#include <glib.h>
#include "common/macros.h"
#include <babeltrace2/babeltrace.h>

#include "lttng-live.h"

int lttng_live_metadata_create_stream(struct lttng_live_session *session,
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/ctf/lttng-live/viewer-connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
#define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER"
#include "logging/comp-logging.h"

#include <stdio.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <sys/types.h>
#include <unistd.h>

#include <glib.h>
#include <inttypes.h>
#include <sys/types.h>
#include <fcntl.h>

#include "compat/socket.h"
#include "compat/endian.h"
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/ctf/lttng-live/viewer-connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
*/

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>

#include <glib.h>

#include <babeltrace2/babeltrace.h>

#include "common/macros.h"
#include "compat/socket.h"

Expand Down

0 comments on commit 28fb42b

Please sign in to comment.