svn commit: r301005 - head/usr.sbin/keyserv
Pedro F. Giffuni
pfg at FreeBSD.org
Mon May 30 20:41:56 UTC 2016
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) {
More information about the svn-src-head
mailing list