From patchwork Wed Sep 30 13:02:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Eder X-Patchwork-Id: 34579 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id A5F20B7BC2 for ; Wed, 30 Sep 2009 23:10:35 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754064AbZI3NKY (ORCPT ); Wed, 30 Sep 2009 09:10:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754047AbZI3NKY (ORCPT ); Wed, 30 Sep 2009 09:10:24 -0400 Received: from smtp-out.google.com ([216.239.45.13]:30880 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbZI3NKX (ORCPT ); Wed, 30 Sep 2009 09:10:23 -0400 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id n8UDAIoB009790; Wed, 30 Sep 2009 06:10:19 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1254316219; bh=kFnUzyfpJFyyfgzxAz1E5LN+TkY=; h=DomainKey-Signature:Subject:From:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Content-Transfer-Encoding:To:Cc:Cc: X-System-Of-Record; b=tCDcImH8rah1qAcUBH5RgOJoo+dZwtNa7nLtQPe2GLwY IZpvPIZfH5pUTUbPTwH450wkiZONPQGBBjDlfywfuA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=subject:from:date:message-id:user-agent:mime-version: content-type:content-transfer-encoding:to:cc:cc:x-system-of-record; b=xfAdwpL3cSQejM90N5XGT3BJc26cFqp/0VHRK6Yvm0BKPfui4HPvMb3NiwlEW2Fbj dBvmBLB64PLRM24fIkVyQ== Received: from jazzy.zrh.corp.google.com (jazzy.zrh.corp.google.com [172.16.74.150]) by wpaz17.hot.corp.google.com with ESMTP id n8UDAFIS011152; Wed, 30 Sep 2009 06:10:16 -0700 Received: by jazzy.zrh.corp.google.com (Postfix, from userid 95149) id 5B539EA478; Wed, 30 Sep 2009 15:10:15 +0200 (CEST) Subject: [PATCH] conntrack: do not print garbage after the usage message From: Hannes Eder Date: Wed, 30 Sep 2009 15:02:09 +0200 Message-ID: <20090930130142.16484.76529.stgit@jazzy.zrh.corp.google.com> User-Agent: StGit/0.15-rc3 MIME-Version: 1.0 To: Pablo Neira Ayuso Cc: netdev@vger.kernel.org Cc: netfilter-devel@vger.kernel.org X-System-Of-Record: true Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When 'conntrack' is called with no arguments then garbage is printed after the usage message. This patch fixes this. Signed-off-by: Hannes Eder src/conntrack.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/conntrack.c b/src/conntrack.c index 42b5133..5ca68d1 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -1493,7 +1493,7 @@ int main(int argc, char *argv[]) free_options(); - if (exit_msg[cmd][0]) { + if (cmd != CT_NONE && exit_msg[cmd][0]) { fprintf(stderr, "%s v%s (conntrack-tools): ",PROGNAME,VERSION); fprintf(stderr, exit_msg[cmd], counter); if (counter == 0 && !(command & (CT_LIST | EXP_LIST)))