From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387Ab1LSWNL (ORCPT ); Mon, 19 Dec 2011 17:13:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8267 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667Ab1LSWNI (ORCPT ); Mon, 19 Dec 2011 17:13:08 -0500 Date: Mon, 19 Dec 2011 17:13:03 -0500 From: Jason Baron To: greg@kroah.com Cc: jim.cromie@gmail.com, joe@perches.com, bart.vanassche@gmail.com, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: References: Subject: [PATCH 12/16] dynamic_debug: chop off comments in ddebug_tokenize Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jim Cromie If a token begins with #, the remainder of query string is a comment, so drop it. Doing it here avoids '#' in quoted strings. Signed-off-by: Jim Cromie Signed-off-by: Jason Baron --- lib/dynamic_debug.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 4be55d8..86a9abb 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -183,6 +183,8 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords) buf = skip_spaces(buf); if (!*buf) break; /* oh, it was trailing whitespace */ + if (*buf == '#') + break; /* token starts comment, skip rest of line */ /* find `end' of word, whitespace separated or quoted */ if (*buf == '"' || *buf == '\'') { -- 1.7.7.3