Fix last modifications to string_from_user operations
authorYannick Brosseau <yannick.brosseau@gmail.com>
Sat, 3 Dec 2011 02:03:19 +0000 (21:03 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 3 Dec 2011 02:03:19 +0000 (21:03 -0500)
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/lttng-events.h

index ff6273fb3541ced6d2e46d2b7261a2e609b9d257..d486994f3a0c2202741037c8ef68ffe5ebd16bc5 100644 (file)
@@ -347,7 +347,7 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
 #undef __string_from_user
 #define __string_from_user(_item, _src)                                               \
        __event_len += __dynamic_len[__dynamic_len_idx++] =                    \
-               min_t(size_t, strlen_user(_src), 1);
+               max_t(size_t, strlen_user(_src), 1);
 
 #undef TP_PROTO
 #define TP_PROTO(args...) args
@@ -557,7 +557,7 @@ __assign_##dest##_2:                                                        \
                        (void) __typemap.dest;                          \
                lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__typemap.dest));\
                __ustrlen = __get_dynamic_array_len(dest);              \
-               if (likely(__ustrlen) > 1) {                            \
+               if (likely(__ustrlen > 1)) {                            \
                        __chan->ops->event_write_from_user(&__ctx, src, \
                                __ustrlen - 1);                         \
                }                                                       \
This page took 0.027471 seconds and 4 git commands to generate.