diff options
author | Brian Behlendorf <[email protected]> | 2010-07-21 16:31:42 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-07-21 16:31:42 -0700 |
commit | 8b0eb3f0dcf293467ddfd4b0f0d7e757f2369452 (patch) | |
tree | a74974eb6278fd0c8146fc4601a8fe0f90fb5941 | |
parent | 15b52c083ee886d9cb102655b4313ae7c027784a (diff) |
Remove deadcode caused by removal of format1 arg
Commit 55abb0929e4fbe326a9737650a167a1a988ad86b removed the never
used format1 argument of spl_debug_msg(). That in turn resulted
in some deadcode which should be removed since it's now useless.
-rw-r--r-- | module/spl/spl-debug.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index f6ec86ac4..008115e4e 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -669,7 +669,6 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, int max_nob; va_list ap; int i; - int remain; if (subsys == 0) subsys = SS_DEBUG_SUBSYS; @@ -726,13 +725,8 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, needed = 0; if (format) { - remain = max_nob - needed; - if (remain < 0) - remain = 0; - va_start(ap, format); - needed += vsnprintf(string_buf+needed, remain, - format, ap); + needed += vsnprintf(string_buf, max_nob, format, ap); va_end(ap); } @@ -807,13 +801,10 @@ console: needed = 0; if (format != NULL) { - remain = TRACE_CONSOLE_BUFFER_SIZE - needed; - if (remain > 0) { - va_start(ap, format); - needed += vsnprintf(string_buf+needed, remain, - format, ap); - va_end(ap); - } + va_start(ap, format); + needed += vsnprintf(string_buf, + TRACE_CONSOLE_BUFFER_SIZE, format, ap); + va_end(ap); } trace_print_to_console(&header, mask, string_buf, needed, file, fn); |