Rewrites lttng-ctl's set_session_daemon_path
authorThibault, Daniel <Daniel.Thibault@drdc-rddc.gc.ca>
Mon, 30 Jan 2012 21:26:34 +0000 (16:26 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 30 Jan 2012 21:32:32 +0000 (16:32 -0500)
commit08a9c49fb6a76bd9552e8f1834ead9d2632d98af
tree562dda56640b08cadc78ab7cc6729fcf4a33b024
parentd44c5520e024156944a70b8f32c40ccb41153042
Rewrites lttng-ctl's set_session_daemon_path

This fifth patch rewrites lttng-ctl's set_session_daemon_path() to avoid
duplicating snippets of code. It also fixes the snprintf return value
test so the code works with both GNU C < 2.1 and >= 2.1. With GNU C <
2.1, snprintf returns -1 if the target buffer is too small; with GNU C
>= 2.1, snprintf returns the required size (excluding the closing null)
under the same conditions.

Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/lib/lttng-ctl/lttng-ctl.c
This page took 0.024676 seconds and 4 git commands to generate.