Skip to content

Commit

Permalink
Remove deadcode caused by removal of format1 arg
Browse files Browse the repository at this point in the history
Commit 55abb09 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.
  • Loading branch information
behlendorf committed Jul 21, 2010
1 parent 15b52c0 commit 8b0eb3f
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions module/spl/spl-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -807,13 +801,10 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file,

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);
Expand Down

0 comments on commit 8b0eb3f

Please sign in to comment.