From owner-svn-src-all@FreeBSD.ORG Fri Apr 23 14:35:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED661065672; Fri, 23 Apr 2010 14:35:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDAA88FC1A; Fri, 23 Apr 2010 14:35:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3NEZ3dx026377; Fri, 23 Apr 2010 14:35:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3NEZ3WZ026375; Fri, 23 Apr 2010 14:35:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004231435.o3NEZ3WZ026375@svn.freebsd.org> From: Andriy Gapon Date: Fri, 23 Apr 2010 14:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207117 - stable/7/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2010 14:35:04 -0000 Author: avg Date: Fri Apr 23 14:35:03 2010 New Revision: 207117 URL: http://svn.freebsd.org/changeset/base/207117 Log: MFC r206687: indent(1): don't treat bare '_t' as a type name with -ta Modified: stable/7/usr.bin/indent/lexi.c Directory Properties: stable/7/usr.bin/indent/ (props changed) Modified: stable/7/usr.bin/indent/lexi.c ============================================================================== --- stable/7/usr.bin/indent/lexi.c Fri Apr 23 14:32:58 2010 (r207116) +++ stable/7/usr.bin/indent/lexi.c Fri Apr 23 14:35:03 2010 (r207117) @@ -251,9 +251,10 @@ lexi(void) if (auto_typedefs) { const char *q = s_token; + size_t q_len = strlen(q); /* Check if we have an "_t" in the end */ - if (q[0] && q[1] && - (strcmp(q + strlen(q) - 2, "_t") == 0)) { + if (q_len > 2 && + (strcmp(q + q_len - 2, "_t") == 0)) { ps.its_a_keyword = true; ps.last_u_d = true; goto found_auto_typedef;