summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-15 20:27:36 +0000
committerdim <dim@FreeBSD.org>2011-12-15 20:27:36 +0000
commit1551a9d47765ddb3229399b4bb3fbacf4faaf66b (patch)
treeb209cb26b5988f6055b6ce3e74eaa8846070c83c /lib
parenteff6973ad8659f6856d467e550bbf642aac2eaac (diff)
downloadFreeBSD-src-1551a9d47765ddb3229399b4bb3fbacf4faaf66b.zip
FreeBSD-src-1551a9d47765ddb3229399b4bb3fbacf4faaf66b.tar.gz
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. MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/crypt_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c
index 255b266..4e5c793 100644
--- a/lib/libc/rpc/crypt_client.c
+++ b/lib/libc/rpc/crypt_client.c
@@ -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);
OpenPOWER on IntegriCloud