[2.5] cmdline_read_proc strangeness?

Oleg Drokin (green@namesys.com)
Tue, 20 May 2003 15:40:10 +0400


Hello!

There is a bit of strange code in fs/proc/proc_misc.c::cmdline_read_proc()

int len;

len = sprintf(page, "%s\n", saved_command_line);
len = strlen(page);

Why do we need the strlen() here? It looks like pure overhead to me.
Am I missing something obvious?

Bye,
Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/