diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-03-15 11:28:43 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-03-15 11:28:43 +0000 |
commit | 0fb553737417954c8479378f659068c06e48046b (patch) | |
tree | 7037e2e86dd5e1db43dfc945a649b8d4d423c573 | |
parent | 582a095e9b9c3fc16c91d2edd690be6fc438d4ae (diff) | |
parent | 5a4ef21a18dfdc65328821a265582d03e85a97c9 (diff) | |
download | illumos-joyent-0fb553737417954c8479378f659068c06e48046b.tar.gz |
[illumos-gate merge]
commit 5a4ef21a18dfdc65328821a265582d03e85a97c9
5227 space should be automatically included in 'print' class by localedef
commit c16316e19fd89a1ebd17d6934bc47af7a11ff924
6745 Swapped bytes in rpc_cots_connections port kstat
commit 8b2aab4fb2ee21a9076eb25068178246a12470b7
6436 156 lint errors in common/crypto/edonr/edonr.c
-rw-r--r-- | usr/src/cmd/localedef/ctype.c | 2 | ||||
-rw-r--r-- | usr/src/common/crypto/edonr/edonr.c | 6 | ||||
-rw-r--r-- | usr/src/common/crypto/edonr/edonr_byteorder.h | 7 | ||||
-rw-r--r-- | usr/src/uts/common/rpc/clnt_cots.c | 22 |
4 files changed, 21 insertions, 16 deletions
diff --git a/usr/src/cmd/localedef/ctype.c b/usr/src/cmd/localedef/ctype.c index df474ca1bc..a0078072ba 100644 --- a/usr/src/cmd/localedef/ctype.c +++ b/usr/src/cmd/localedef/ctype.c @@ -300,6 +300,8 @@ dump_ctype(void) ctn->ctype |= _ISLOWER; if ((wc >= '0') && (wc <= '9')) ctn->ctype |= _ISDIGIT; + if (wc == ' ') + ctn->ctype |= _ISPRINT; if (strchr(" \f\n\r\t\v", (char)wc) != NULL) ctn->ctype |= _ISSPACE; if (strchr("0123456789ABCDEFabcdef", (char)wc) != NULL) diff --git a/usr/src/common/crypto/edonr/edonr.c b/usr/src/common/crypto/edonr/edonr.c index afc4361e26..912e8c083f 100644 --- a/usr/src/common/crypto/edonr/edonr.c +++ b/usr/src/common/crypto/edonr/edonr.c @@ -23,10 +23,10 @@ * Copyright (C) 2009, 2010, Jorn Amundsen <jorn.amundsen@ntnu.no> * Tweaked Edon-R implementation for SUPERCOP, based on NIST API. * - * $Id: edonr.c 517 2013-02-17 20:34:39Z joern $ */ /* * Portions copyright (c) 2013, Saso Kiselkov, All rights reserved + * Copyright 2016 Gary Mills */ /* determine where we can get bcopy/bzero declarations */ @@ -659,6 +659,7 @@ EdonRFinal(EdonRState *state, uint8_t *hashval) switch (state->hashbitlen) { case 224: { #if defined(MACHINE_IS_BIG_ENDIAN) + /* LINTED: pointer cast may result in improper alignment */ uint32_t *d32 = (uint32_t *)hashval; uint32_t *s32 = hashState224(state)->DoublePipe + 9; int j; @@ -673,6 +674,7 @@ EdonRFinal(EdonRState *state, uint8_t *hashval) } case 256: { #if defined(MACHINE_IS_BIG_ENDIAN) + /* LINTED: pointer cast may result in improper alignment */ uint32_t *d32 = (uint32_t *)hashval; uint32_t *s32 = hashState224(state)->DoublePipe + 8; int j; @@ -687,6 +689,7 @@ EdonRFinal(EdonRState *state, uint8_t *hashval) } case 384: { #if defined(MACHINE_IS_BIG_ENDIAN) + /* LINTED: pointer cast may result in improper alignment */ uint64_t *d64 = (uint64_t *)hashval; uint64_t *s64 = hashState384(state)->DoublePipe + 10; int j; @@ -701,6 +704,7 @@ EdonRFinal(EdonRState *state, uint8_t *hashval) } case 512: { #if defined(MACHINE_IS_BIG_ENDIAN) + /* LINTED: pointer cast may result in improper alignment */ uint64_t *d64 = (uint64_t *)hashval; uint64_t *s64 = hashState512(state)->DoublePipe + 8; int j; diff --git a/usr/src/common/crypto/edonr/edonr_byteorder.h b/usr/src/common/crypto/edonr/edonr_byteorder.h index 9fdf2b3de4..4ac0bb4be3 100644 --- a/usr/src/common/crypto/edonr/edonr_byteorder.h +++ b/usr/src/common/crypto/edonr/edonr_byteorder.h @@ -25,10 +25,10 @@ * C header file to determine compile machine byte order. Take care when cross * compiling. * - * $Id: byteorder.h 517 2013-02-17 20:34:39Z joern $ */ /* * Portions copyright (c) 2013, Saso Kiselkov, All rights reserved + * Copyright 2016 Gary Mills */ #ifndef _CRYPTO_EDONR_BYTEORDER_H @@ -134,8 +134,9 @@ #if !defined(__arch64__) && !defined(__sparcv8) && defined(__sparcv9) #define __arch64__ #endif -#if defined(__GNUC__) || (defined(__SUNPRO_C) && __SUNPRO_C > 0x590) -/* need Sun Studio C 5.10 and above for GNU inline assembly */ +#if defined(__GNUC__) || (defined(__SUNPRO_C) && __SUNPRO_C > 0x590 && \ + !defined(__lint)) +/* need Sun Studio C 5.10 and above for GNU inline assembly, but not lint */ #if defined(__arch64__) #define sparc_ld_swap64(s64, d64) \ __asm__("ldxa [%1]0x88,%0" : "=r"(d64) : "r"(s64)) diff --git a/usr/src/uts/common/rpc/clnt_cots.c b/usr/src/uts/common/rpc/clnt_cots.c index 88fe0f86ff..cb8f337c69 100644 --- a/usr/src/uts/common/rpc/clnt_cots.c +++ b/usr/src/uts/common/rpc/clnt_cots.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ /* @@ -559,7 +559,7 @@ clnt_zone_destroy(zoneid_t zoneid, void *unused) int clnt_cots_kcreate(dev_t dev, struct netbuf *addr, int family, rpcprog_t prog, - rpcvers_t vers, uint_t max_msgsize, cred_t *cred, CLIENT **ncl) + rpcvers_t vers, uint_t max_msgsize, cred_t *cred, CLIENT **ncl) { CLIENT *h; cku_private_t *p; @@ -1546,7 +1546,7 @@ cots_done: */ void clnt_cots_kinit(CLIENT *h, dev_t dev, int family, struct netbuf *addr, - int max_msgsize, cred_t *cred) + int max_msgsize, cred_t *cred) { /* LINTED pointer alignment */ cku_private_t *p = htop(h); @@ -1606,8 +1606,7 @@ clnt_cots_kinit(CLIENT *h, dev_t dev, int family, struct netbuf *addr, /* ARGSUSED */ static int clnt_cots_ksettimers(CLIENT *h, struct rpc_timers *t, struct rpc_timers *all, - int minimum, void (*feedback)(int, int, caddr_t), caddr_t arg, - uint32_t xid) + int minimum, void (*feedback)(int, int, caddr_t), caddr_t arg, uint32_t xid) { /* LINTED pointer alignment */ cku_private_t *p = htop(h); @@ -1653,10 +1652,9 @@ conn_kstat_update(kstat_t *ksp, int rw) cm_entry->x_server.buf; b = (uchar_t *)&sa->sin_addr; (void) sprintf(fbuf, - "%03d.%03d.%03d.%03d", b[0] & 0xFF, b[1] & 0xFF, + "%d.%d.%d.%d", b[0] & 0xFF, b[1] & 0xFF, b[2] & 0xFF, b[3] & 0xFF); - cm_ksp_data->x_port.value.ui32 = - (uint32_t)sa->sin_port; + cm_ksp_data->x_port.value.ui32 = ntohs(sa->sin_port); } else if (cm_entry->x_family == AF_INET6 && cm_entry->x_server.len >= sizeof (struct sockaddr_in6)) { @@ -1665,14 +1663,14 @@ conn_kstat_update(kstat_t *ksp, int rw) sin6 = (struct sockaddr_in6 *)cm_entry->x_server.buf; (void) kinet_ntop6((uchar_t *)&sin6->sin6_addr, fbuf, INET6_ADDRSTRLEN); - cm_ksp_data->x_port.value.ui32 = sin6->sin6_port; + cm_ksp_data->x_port.value.ui32 = ntohs(sin6->sin6_port); } else { struct sockaddr_in *sa; sa = (struct sockaddr_in *)cm_entry->x_server.buf; b = (uchar_t *)&sa->sin_addr; (void) sprintf(fbuf, - "%03d.%03d.%03d.%03d", b[0] & 0xFF, b[1] & 0xFF, + "%d.%d.%d.%d", b[0] & 0xFF, b[1] & 0xFF, b[2] & 0xFF, b[3] & 0xFF); } KSTAT_NAMED_STR_BUFLEN(&cm_ksp_data->x_server) = @@ -1703,7 +1701,7 @@ clnt_delay(clock_t ticks, bool_t nosignal) */ static enum clnt_stat connmgr_cwait(struct cm_xprt *cm_entry, const struct timeval *waitp, - bool_t nosignal) + bool_t nosignal) { bool_t interrupted; clock_t timout, cv_stat; @@ -3105,7 +3103,7 @@ connmgr_snddis(struct cm_xprt *cm_entry) */ static int clnt_dispatch_send(queue_t *q, mblk_t *mp, calllist_t *e, uint_t xid, - uint_t queue_flag) + uint_t queue_flag) { ASSERT(e != NULL); |