Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263700AbTETL1U (ORCPT ); Tue, 20 May 2003 07:27:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263705AbTETL1T (ORCPT ); Tue, 20 May 2003 07:27:19 -0400 Received: from angband.namesys.com ([212.16.7.85]:27776 "EHLO angband.namesys.com") by vger.kernel.org with ESMTP id S263700AbTETL1T (ORCPT ); Tue, 20 May 2003 07:27:19 -0400 Date: Tue, 20 May 2003 15:40:10 +0400 From: Oleg Drokin To: linux-kernel@vger.kernel.org Subject: [2.5] cmdline_read_proc strangeness? Message-ID: <20030520114010.GA27425@namesys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 560 Lines: 19 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/