lkml.org 
[lkml]   [2009]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ftrace: remove redundant test on nsigned
Unsigned `cnt' cannot be less than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Or should it be `if (!cnt || cnt > MAX)' and what should MAX be then?

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index aa08be6..b83f030 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -204,7 +204,7 @@ ftrace_event_write(struct file *file, const char __user *ubuf,
char *buf;
char ch;

- if (!cnt || cnt < 0)
+ if (!cnt)
return 0;

ret = tracing_update_buffers();

\
 
 \ /
  Last update: 2009-06-22 21:19    [W:0.048 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site