mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
Fix enum warning in keyserv
This fixes a clang 19 warning: usr.sbin/keyserv/crypt_server.c:237:53: error: comparison of different enumeration types ('des_mode' (aka 'enum des_mode') and 'enum desmode') [-Werror,-Wenum-compare] 237 | if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { | ~~~~~~~~~~~~~~ ^ ~~~ The type of `argp->des_mode` (aka `desargs::des_mode`) is `enum des_mode` from `/usr/include/rpcsvc/crypt.h`, not `enum desmode` from `/usr/include/rpc/des.h` (which is used in `struct desparams`). Luckily the integer values of `enum desmode`'s `CBC` and `ECB` are identical to those of `enum des_mode`'s `CBC_DES` and `ECB_DES`, so replace both values. MFC after: 3 days
This commit is contained in:
parent
09ed116dc5
commit
1d5a5500ad
@ -234,9 +234,9 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp)
|
||||
* getting ECB mode.
|
||||
*/
|
||||
#ifdef BROKEN_DES
|
||||
if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) {
|
||||
if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC_DES) {
|
||||
#else
|
||||
if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB) {
|
||||
if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB_DES) {
|
||||
#endif
|
||||
int i;
|
||||
char *dptr;
|
||||
|
Loading…
Reference in New Issue
Block a user