Fix: int printed as uint
A message that is not in the archive (sent off-list or not yet received): [email protected]
Merged in master and stable-2.7.
Thanks!
Jérémie
Quoted 36 lines · Michael Jeanson
Signed-off-by Michael Jeanson <[email protected]>--- src/common/ust-consumer/ust-consumer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)src/common/ust-consumer/ust-consumer.c +3
-4@@ -47,7 +47,7 @@#include "ust-consumer.h" -#define UINT_MAX_STR_LEN 11/* includes \0 */ +#define INT_MAX_STR_LEN 12/* includes \0 */ extern struct lttng_consumer_global_data consumer_data;extern int consumer_poll_timeout;@@ -248,12 +248,12 @@ error:static int get_stream_shm_path (char *stream_shm_path,const char *shm_path,int cpu) { -char cpu_nr[UINT_MAX_STR_LEN ];/* unsigned int max len */ +char cpu_nr[INT_MAX_STR_LEN ];/* int max len */ int ret;strncpy (stream_shm_path, shm_path,PATH_MAX ); stream_shm_path[PATH_MAX -1 ] ='\0' ; - ret =snprintf (cpu_nr,UINT_MAX_STR_LEN ,"%u" , cpu); + ret =snprintf (cpu_nr,INT_MAX_STR_LEN ,"%i" , cpu);if (ret <0 ) {PERROR ("snprintf" ); goto end; --1.9.1
Signature · 8 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev