From owner-svn-src-all@freebsd.org Mon May 30 20:41:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF028B532C7; Mon, 30 May 2016 20:41:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD51130A; Mon, 30 May 2016 20:41:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4UKftO8055452; Mon, 30 May 2016 20:41:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4UKftNS055451; Mon, 30 May 2016 20:41:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605302041.u4UKftNS055451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 May 2016 20:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301005 - head/usr.sbin/keyserv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Mon, 30 May 2016 20:41:56 -0000 Author: pfg Date: Mon May 30 20:41:55 2016 New Revision: 301005 URL: https://svnweb.freebsd.org/changeset/base/301005 Log: keyserv(1): drop useless comparison. Comparing a character array against NULL serves no purpose. In any case we are always asigning a value just before using the value so obviate the comparison altogether. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D6651 CID: 1008422 Modified: head/usr.sbin/keyserv/crypt_server.c Modified: head/usr.sbin/keyserv/crypt_server.c ============================================================================== --- head/usr.sbin/keyserv/crypt_server.c Mon May 30 19:59:51 2016 (r301004) +++ head/usr.sbin/keyserv/crypt_server.c Mon May 30 20:41:55 2016 (r301005) @@ -180,12 +180,13 @@ void load_des(warn, libpath) { char dlpath[MAXPATHLEN]; - if (libpath == NULL) { - snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, LIBCRYPTO); - } else + if (libpath == NULL) + snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, + LIBCRYPTO); + else snprintf(dlpath, sizeof(dlpath), "%s", libpath); - if (dlpath != NULL && (dlhandle = dlopen(dlpath, 0444)) != NULL) + if ((dlhandle = dlopen(dlpath, 0444)) != NULL) _my_crypt = (int (*)())dlsym(dlhandle, "_des_crypt"); if (_my_crypt == NULL) {