Date: Mon, 30 May 2016 20:41:55 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301005 - head/usr.sbin/keyserv Message-ID: <201605302041.u4UKftNS055451@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605302041.u4UKftNS055451>