svn commit: r229078 - stable/9/lib/libc/rpc

Dimitry Andric dim at FreeBSD.org
Sat Dec 31 12:52:19 UTC 2011


Author: dim
Date: Sat Dec 31 12:52:18 2011
New Revision: 229078
URL: http://svn.freebsd.org/changeset/base/229078

Log:
  MFC r228538:
  
  In lib/libc/rpc/crypt_client.c, fix a clang warning about an implicit
  conversion between enum desdir/desmode from include/rpc/des.h, and enum
  desdir/desmode from include/rpcsvc/crypt.x.  These are actually
  different enums, with different value names, but by accident the integer
  representation of the enum values happened to be the same.

Modified:
  stable/9/lib/libc/rpc/crypt_client.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/crypt_client.c
==============================================================================
--- stable/9/lib/libc/rpc/crypt_client.c	Sat Dec 31 12:45:43 2011	(r229077)
+++ stable/9/lib/libc/rpc/crypt_client.c	Sat Dec 31 12:52:18 2011	(r229078)
@@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms)
 
 	des_crypt_1_arg.desbuf.desbuf_len = len;
 	des_crypt_1_arg.desbuf.desbuf_val = buf;
-	des_crypt_1_arg.des_dir = dparms->des_dir;
-	des_crypt_1_arg.des_mode = dparms->des_mode;
+	des_crypt_1_arg.des_dir = (dparms->des_dir == ENCRYPT) ? ENCRYPT_DES : DECRYPT_DES;
+	des_crypt_1_arg.des_mode = (dparms->des_mode == CBC) ? CBC_DES : ECB_DES;
 	bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
 	bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
 


More information about the svn-src-all mailing list