summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-02-23 13:01:53 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-02-23 13:01:53 +0000
commitb7718c339dde99eb2f4bf2e8a4cdabfc3acf9d6c (patch)
tree92d313f21c843f56ef4dd64594a4f51ccd82804c /usr/src/lib
parent4f5bbb4c37e2dca7b0722f89c8dfe13be1fbc131 (diff)
parentcf421650297f304644a9fe84c51540de5823fe84 (diff)
downloadillumos-joyent-b7718c339dde99eb2f4bf2e8a4cdabfc3acf9d6c.tar.gz
[illumos-gate merge]
commit cf421650297f304644a9fe84c51540de5823fe84 9160 libtecla: this statement may fall through commit 38a641c5970af3d16902370fb738a6792620e1bf 9155 pkcs11: this statement may fall through commit d7fdecd2374114124f192b3bfc84d2d294bb45ab 9154 libldap5: this statement may fall through commit e10a6edabdc38e5fd1d9da6a6a54774a41f91b22 9152 loader: allow comma in variable names commit e501678557789347eedf20b9e0f9a5014f56f18d 9151 libdhcputil: this statement may fall through commit 48122e8f03678c2b5a9cea6e9c4d4d2629c5a13f 9148 sun_sas: this statement may fall through commit 69b2e41e53282c11528827637e627614e2af615b 9147 sun_sas: comparison between pointer and zero character constant commit 59ee40951f56cfa1c0e6c5c6aeea10605267116a 9138 libcurses: this statement may fall through
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libcurses/screen/scr_reset.c40
-rw-r--r--usr/src/lib/libdhcputil/common/dhcp_inittab.c3
-rw-r--r--usr/src/lib/libldap5/sources/ldap/ber/io.c2
-rw-r--r--usr/src/lib/libldap5/sources/ldap/common/friendly.c17
-rw-r--r--usr/src/lib/libldap5/sources/ldap/common/getdn.c11
-rw-r--r--usr/src/lib/libldap5/sources/ldap/common/ldaputf8.c12
-rw-r--r--usr/src/lib/libtecla/common/expand.c3
-rw-r--r--usr/src/lib/libtecla/common/getline.c3
-rw-r--r--usr/src/lib/libtecla/common/history.c3
-rw-r--r--usr/src/lib/pkcs11/libpkcs11/common/metaAttrManager.c1
-rw-r--r--usr/src/lib/sun_sas/common/devtree_device_disco.c2
-rw-r--r--usr/src/lib/sun_sas/common/sun_sas.c1
12 files changed, 43 insertions, 55 deletions
diff --git a/usr/src/lib/libcurses/screen/scr_reset.c b/usr/src/lib/libcurses/screen/scr_reset.c
index 5d5a359fbf..490863c2e0 100644
--- a/usr/src/lib/libcurses/screen/scr_reset.c
+++ b/usr/src/lib/libcurses/screen/scr_reset.c
@@ -37,8 +37,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*LINTLIBRARY*/
#include "curses_inc.h"
@@ -97,13 +95,13 @@ scr_reset(FILE *filep, int type)
}
/* check magic number */
- if (fread((char *) &magic, sizeof (short), 1, filep) != 1)
+ if (fread((char *)&magic, sizeof (short), 1, filep) != 1)
goto err;
if (magic != SVR3_DUMP_MAGIC_NUMBER)
goto err;
/* get modification time of image in file */
- if (fread((char *) &ttytime, sizeof (time_t), 1, filep) != 1)
+ if (fread((char *)&ttytime, sizeof (time_t), 1, filep) != 1)
goto err;
if ((type != 1) && ((ttyname(cur_term->Filedes) == NULL) ||
@@ -128,13 +126,13 @@ scr_reset(FILE *filep, int type)
((type == 2) && ((win1 = dupwin(win)) == NULL)) ||
(win->_maxy != curscr->_maxy) || (win->_maxx != curscr->_maxx) ||
/* soft labels */
- (fread((char *) &magic, sizeof (int), 1, filep) != 1))
+ (fread((char *)&magic, sizeof (int), 1, filep) != 1))
goto err;
/*
- * if soft labels were dumped, we would like either read them
- * or advance the file pointer pass them
- */
+ * if soft labels were dumped, we would like either read them
+ * or advance the file pointer pass them
+ */
if (magic) {
short i, labmax, lablen;
SLK_MAP *slk = SP->slk;
@@ -144,10 +142,10 @@ scr_reset(FILE *filep, int type)
*/
/*
* char **labdis = SP->slk->_ldis, **labval = SP->slk->_lval;
- */
+ */
- if ((fread((char *) &labmax, sizeof (short), 1, filep) != 1) ||
- (fread((char *) &lablen, sizeof (short), 1, filep) != 1)) {
+ if ((fread((char *)&labmax, sizeof (short), 1, filep) != 1) ||
+ (fread((char *)&lablen, sizeof (short), 1, filep) != 1)) {
goto err;
}
@@ -162,7 +160,7 @@ scr_reset(FILE *filep, int type)
* filep) != lablen) ||
* (fread(labval[i], sizeof (char), lablen,
* filep != lablen))
- */
+ */
if ((fread(slk->_ldis[i], sizeof (char),
lablen, filep) != lablen) ||
(fread(slk->_lval[i],
@@ -172,7 +170,7 @@ scr_reset(FILE *filep, int type)
}
(*_do_slk_tch)();
} else {
- if (fseek(filep, (long) (2 * labmax * lablen *
+ if (fseek(filep, (long)(2 * labmax * lablen *
sizeof (char)), 1) != 0)
goto err;
}
@@ -180,7 +178,7 @@ scr_reset(FILE *filep, int type)
/* read the color information(if any) from the file */
- if (fread((char *) &magic, sizeof (int), 1, filep) != 1)
+ if (fread((char *)&magic, sizeof (int), 1, filep) != 1)
goto err;
if (magic) {
@@ -196,15 +194,15 @@ scr_reset(FILE *filep, int type)
/* new terminal doesn't support color, in order to know how to */
/* deal with the rest of the file */
- if ((fread((char *) &colors, sizeof (int), 1, filep) != 1) ||
- (fread((char *) &color_pairs, sizeof (int), 1,
- filep) != 1) || (fread((char *) &could_change,
+ if ((fread((char *)&colors, sizeof (int), 1, filep) != 1) ||
+ (fread((char *)&color_pairs, sizeof (int), 1,
+ filep) != 1) || (fread((char *)&could_change,
sizeof (char), 1, filep) != 1))
goto err;
if (max_pairs == -1 || cur_term->_pairs_tbl == NULL ||
colors > max_colors || color_pairs > max_pairs) {
- if (fseek(filep, (long) (colors * sizeof (_Color) +
+ if (fseek(filep, (long)(colors * sizeof (_Color) +
color_pairs * sizeof (_Color_pair)), 1) != 0)
goto err;
} else {
@@ -237,7 +235,7 @@ scr_reset(FILE *filep, int type)
/* the old terminal could modify colors, by the new one */
/* cannot skip over color_table info. */
- if (fseek(filep, (long) (colors *
+ if (fseek(filep, (long)(colors *
sizeof (_Color)), 1) != 0)
goto err;
}
@@ -265,7 +263,7 @@ err:
if (ptp->init)
/* LINTED */
(void) init_pair((short)i,
- ptp->foreground, ptp->background);
+ ptp->foreground, ptp->background);
}
free(save_ptp);
}
@@ -289,7 +287,7 @@ err:
/* clear the hash table */
for (y = curscr->_maxy; y > 0; --y)
*hash++ = _NOHASH;
- /* LINTED */ /* Known fall-through on case statement. */
+ /* FALLTHROUGH */
case 0:
{
int saveflag = curscr->_flags & _CANT_BE_IMMED;
diff --git a/usr/src/lib/libdhcputil/common/dhcp_inittab.c b/usr/src/lib/libdhcputil/common/dhcp_inittab.c
index ddaf9d7ab9..f8bcbea0df 100644
--- a/usr/src/lib/libdhcputil/common/dhcp_inittab.c
+++ b/usr/src/lib/libdhcputil/common/dhcp_inittab.c
@@ -1398,8 +1398,7 @@ inittab_msg(const char *fmt, ...)
}
action = INITTAB_MSG_OUTPUT;
-
- /* FALLTHRU into INITTAB_MSG_OUTPUT */
+ /* FALLTHROUGH */
case INITTAB_MSG_OUTPUT:
diff --git a/usr/src/lib/libldap5/sources/ldap/ber/io.c b/usr/src/lib/libldap5/sources/ldap/ber/io.c
index 26d3b7da3a..67e8b775ce 100644
--- a/usr/src/lib/libldap5/sources/ldap/ber/io.c
+++ b/usr/src/lib/libldap5/sources/ldap/ber/io.c
@@ -870,7 +870,7 @@ ber_sockbuf_set_option( Sockbuf *sb, int option, void *value )
switch ( option ) {
case LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE:
sb->sb_max_incoming = *((ber_uint_t *) value);
- /* FALL */
+ /* FALLTHROUGH */
case LBER_SOCKBUF_OPT_TO_FILE:
case LBER_SOCKBUF_OPT_TO_FILE_ONLY:
case LBER_SOCKBUF_OPT_NO_READ_AHEAD:
diff --git a/usr/src/lib/libldap5/sources/ldap/common/friendly.c b/usr/src/lib/libldap5/sources/ldap/common/friendly.c
index 79d602160d..cffccb0f96 100644
--- a/usr/src/lib/libldap5/sources/ldap/common/friendly.c
+++ b/usr/src/lib/libldap5/sources/ldap/common/friendly.c
@@ -2,8 +2,6 @@
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
@@ -33,12 +31,6 @@
* friendly.c
*/
-#if 0
-#ifndef lint
-static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-#endif
-
#include "ldap-int.h"
char *
@@ -53,10 +45,9 @@ ldap_friendly_name( char *filename, char *name, FriendlyMap *map )
if ( map == NULL ) {
return( name );
}
- if ( NULL == name)
- {
- return (name);
- }
+ if ( name == NULL ) {
+ return(name);
+ }
if ( *map == NULL ) {
if ( (fp = fopen( filename, "rF" )) == NULL )
@@ -98,7 +89,7 @@ ldap_friendly_name( char *filename, char *name, FriendlyMap *map )
case '"':
if ( !esc )
found = 1;
- /* FALL */
+ /* FALLTHROUGH */
default:
esc = 0;
break;
diff --git a/usr/src/lib/libldap5/sources/ldap/common/getdn.c b/usr/src/lib/libldap5/sources/ldap/common/getdn.c
index 4ab49eef28..db3b93de06 100644
--- a/usr/src/lib/libldap5/sources/ldap/common/getdn.c
+++ b/usr/src/lib/libldap5/sources/ldap/common/getdn.c
@@ -3,8 +3,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
@@ -34,12 +32,6 @@
* getdn.c
*/
-#if 0
-#ifndef lint
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-#endif
-
#include "ldap-int.h"
char *
@@ -238,6 +230,7 @@ ldap_explode( const char *dn, const int notypes, const int nametype )
state = INQUOTE;
break;
case '+': if ( nametype != LDAP_RDN ) break;
+ /* FALLTHROUGH */
case ';':
case ',':
case '\0':
@@ -323,7 +316,7 @@ ldap_explode( const char *dn, const int notypes, const int nametype )
if ( state == OUTQUOTE ) {
goteq = 1;
}
- /* FALL */
+ /* FALLTHROUGH */
default:
plen = LDAP_UTF8LEN(p);
break;
diff --git a/usr/src/lib/libldap5/sources/ldap/common/ldaputf8.c b/usr/src/lib/libldap5/sources/ldap/common/ldaputf8.c
index 65bc85a378..b99a43e448 100644
--- a/usr/src/lib/libldap5/sources/ldap/common/ldaputf8.c
+++ b/usr/src/lib/libldap5/sources/ldap/common/ldaputf8.c
@@ -1,5 +1,3 @@
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
@@ -51,10 +49,15 @@ ldap_utf8next (char* s)
switch (UTF8len [(*next >> 2) & 0x3F]) {
case 0: /* erroneous: s points to the middle of a character. */
case 6: if ((*++next & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 5: if ((*++next & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 4: if ((*++next & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 3: if ((*++next & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 2: if ((*++next & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 1: ++next;
}
return (char*) next;
@@ -88,10 +91,15 @@ ldap_utf8copy (char* dst, const char* src)
switch (UTF8len [(*s >> 2) & 0x3F]) {
case 0: /* erroneous: s points to the middle of a character. */
case 6: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 5: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 4: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 3: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 2: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
+ /* FALLTHROUGH */
case 1: *dst = *s++;
}
return s - (const unsigned char*)src;
diff --git a/usr/src/lib/libtecla/common/expand.c b/usr/src/lib/libtecla/common/expand.c
index db00c7bfff..67991270d0 100644
--- a/usr/src/lib/libtecla/common/expand.c
+++ b/usr/src/lib/libtecla/common/expand.c
@@ -29,8 +29,6 @@
* of the copyright holder.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* If file-system access is to be excluded, this module has no function,
* so all of its code should be excluded.
@@ -887,6 +885,7 @@ static int ef_string_matches_pattern(const char *file, const char *pattern,
/*
* A normal character to be matched explicitly.
*/
+ /* FALLTHROUGH */
default:
if(*fptr == *pptr) {
fptr++;
diff --git a/usr/src/lib/libtecla/common/getline.c b/usr/src/lib/libtecla/common/getline.c
index b717784666..501c2841b6 100644
--- a/usr/src/lib/libtecla/common/getline.c
+++ b/usr/src/lib/libtecla/common/getline.c
@@ -35,8 +35,6 @@
* Copyright (c) 2016 by Delphix. All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Standard headers.
*/
@@ -6481,6 +6479,7 @@ static int _gl_parse_config_line(GetLine *gl, void *stream, GlcGetcFn *getc_fn,
switch(argc) {
case 3:
action = argv[2];
+ /* FALLTHROUGH */
case 2: /* Note the intentional fallthrough */
keyseq = argv[1];
/*
diff --git a/usr/src/lib/libtecla/common/history.c b/usr/src/lib/libtecla/common/history.c
index 377b802890..e1bbbaa8a9 100644
--- a/usr/src/lib/libtecla/common/history.c
+++ b/usr/src/lib/libtecla/common/history.c
@@ -34,8 +34,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -2722,6 +2720,7 @@ static int glh_line_matches_glob(GlhLineStream *lstr, GlhLineStream *pstr)
/*
* A normal character to be matched explicitly.
*/
+ /* FALLTHROUGH */
default:
if(lstr->c == pstr->c) {
glh_step_stream(lstr);
diff --git a/usr/src/lib/pkcs11/libpkcs11/common/metaAttrManager.c b/usr/src/lib/pkcs11/libpkcs11/common/metaAttrManager.c
index 76fae97a64..d404b567c3 100644
--- a/usr/src/lib/pkcs11/libpkcs11/common/metaAttrManager.c
+++ b/usr/src/lib/pkcs11/libpkcs11/common/metaAttrManager.c
@@ -136,6 +136,7 @@ get_master_attributes_by_template(
case CKO_DATA:
/* CKO_DATA has no subtype, just pretend it is found */
found = B_TRUE;
+ break;
default:
/* unknown object class */
return (CKR_ATTRIBUTE_VALUE_INVALID);
diff --git a/usr/src/lib/sun_sas/common/devtree_device_disco.c b/usr/src/lib/sun_sas/common/devtree_device_disco.c
index 90fb546051..53254766ac 100644
--- a/usr/src/lib/sun_sas/common/devtree_device_disco.c
+++ b/usr/src/lib/sun_sas/common/devtree_device_disco.c
@@ -718,7 +718,7 @@ get_attached_paths_info(di_path_t path, struct sun_sas_port *port_ptr)
break;
}
}
- if (charptr != '\0') {
+ if (*charptr != '\0') {
tmpAddr = htonll(strtoll(charptr, NULL, 16));
(void) memcpy(&SASAddress.wwn[0], &tmpAddr, 8);
} else {
diff --git a/usr/src/lib/sun_sas/common/sun_sas.c b/usr/src/lib/sun_sas/common/sun_sas.c
index 3211a5924f..0494238137 100644
--- a/usr/src/lib/sun_sas/common/sun_sas.c
+++ b/usr/src/lib/sun_sas/common/sun_sas.c
@@ -277,6 +277,7 @@ lock(mutex_t *mp)
case ENOTRECOVERABLE:
log(LOG_DEBUG, ROUTINE,
"Lock failed: not recoverable 0x%x", mp);
+ break;
default:
if (loop > DEADLOCK_WARNING) {
log(LOG_DEBUG, ROUTINE,