Skip to contentSkip to conversation

[2.5] cmdline_read_proc strangeness?

DISCUSSION Oleg Drokin 1 participant 1 message May 20, 2003

lore
Share & tools
lore
#0 lore raw

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