From c2968877a54f2a71569086676a96e4ac9f658cf9 Mon Sep 17 00:00:00 2001 From: pfg Date: Mon, 30 May 2016 20:41:55 +0000 Subject: [PATCH] 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 --- usr.sbin/keyserv/crypt_server.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index b4c60363fe42..a97c2e1904b3 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -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) {