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) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to