summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/acpi/acpidump/osillumostbl.c8
-rw-r--r--usr/src/cmd/addbadsec/ix_altsctr.c6
-rw-r--r--usr/src/cmd/audio/audioconvert/main.cc15
-rw-r--r--usr/src/cmd/auditconfig/auditconfig.c18
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/cancel.c2
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/in.lpd.c4
-rw-r--r--usr/src/cmd/print/conv_fix/conv_fix.c4
-rw-r--r--usr/src/cmd/print/lpset/lpset.c8
-rw-r--r--usr/src/cmd/sed/main.c2
-rw-r--r--usr/src/lib/iconv_modules/common/utf8%ibm.c13
-rw-r--r--usr/src/lib/iconv_modules/zh/common/UTF-8%zh_HK.hkscs.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5p.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-euc.c6
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-big5%zh_TW-euc.c6
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-euc%UTF-8.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-big5.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-iso2022-7.c10
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%UTF-8.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-big5.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-euc.c4
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c2
-rw-r--r--usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT.c24
-rw-r--r--usr/src/ucbcmd/chown/chown.c5
-rw-r--r--usr/src/ucbcmd/mkstr/mkstr.c8
-rw-r--r--usr/src/ucbcmd/tset/tset.c47
-rw-r--r--usr/src/uts/common/disp/sysclass.c14
-rw-r--r--usr/src/uts/common/io/tem_safe.c40
-rw-r--r--usr/src/uts/common/os/pcifm.c6
-rw-r--r--usr/src/uts/i86pc/boot/boot_fb.c3
31 files changed, 133 insertions, 138 deletions
diff --git a/usr/src/cmd/acpi/acpidump/osillumostbl.c b/usr/src/cmd/acpi/acpidump/osillumostbl.c
index 2ccde61c9c..26fb8d7577 100644
--- a/usr/src/cmd/acpi/acpidump/osillumostbl.c
+++ b/usr/src/cmd/acpi/acpidump/osillumostbl.c
@@ -444,7 +444,7 @@ OslLoadRsdp(void)
try_bios:
/* Try to get RSDP from BIOS memory */
- if (Gbl_RsdpBase != NULL) {
+ if (Gbl_RsdpBase != 0) {
physaddr = Gbl_RsdpBase;
mapsize = sizeof (ACPI_TABLE_RSDP);
} else {
@@ -658,7 +658,7 @@ OslListBiosTables(void)
}
/* Skip NULL entries in RSDT/XSDT */
- if (TableAddress == NULL) {
+ if (TableAddress == 0) {
continue;
}
@@ -807,7 +807,7 @@ OslGetBiosTable(char *Signature, UINT32 Instance, ACPI_TABLE_HEADER **Table,
/* Skip NULL entries in RSDT/XSDT */
- if (TableAddress == NULL) {
+ if (TableAddress == 0) {
continue;
}
@@ -887,7 +887,7 @@ OslMapTable(ACPI_SIZE Address, char *Signature, ACPI_TABLE_HEADER **Table)
ACPI_TABLE_HEADER *MappedTable;
UINT32 Length;
- if (Address == NULL) {
+ if (Address == 0) {
return (AE_BAD_ADDRESS);
}
diff --git a/usr/src/cmd/addbadsec/ix_altsctr.c b/usr/src/cmd/addbadsec/ix_altsctr.c
index 9907689d94..45471c8bb0 100644
--- a/usr/src/cmd/addbadsec/ix_altsctr.c
+++ b/usr/src/cmd/addbadsec/ix_altsctr.c
@@ -274,7 +274,7 @@ init_altsctr(void)
ap->ap_tblp->alts_map_base =
altsmap_alloc(ap->ap_tbl_secsiz / NBPSCTR,
ap->part.p_size, ap->ap_map_sectot, ALTS_MAP_UP);
- if (ap->ap_tblp->alts_map_base == NULL) {
+ if (ap->ap_tblp->alts_map_base == 0) {
perror("Unable to allocate alternate map on disk: ");
exit(57);
}
@@ -482,7 +482,7 @@ gen_alts_ent(void)
altsmap_alloc(ap->ap_tblp->alts_map_base + ap->ap_map_sectot,
ap->part.p_size,
ap->ap_ent_secsiz / NBPSCTR, ALTS_MAP_UP);
- if (ap->ap_tblp->alts_ent_base == NULL) {
+ if (ap->ap_tblp->alts_ent_base == 0) {
perror("Unable to allocate alternate entry table on disk: ");
exit(65);
}
@@ -512,7 +512,7 @@ assign_altsctr(void)
alts_ind =
altsmap_alloc(ap->part.p_size-1, ap->ap_tblp->alts_map_base +
ap->ap_map_sectot - 1, cluster, ALTS_MAP_DOWN);
- if (alts_ind == NULL) {
+ if (alts_ind == 0) {
(void) fprintf(stderr,
"Unable to allocate alternates for bad starting"
" sector %u.\n", (ap->ap_entp)[i].bad_start);
diff --git a/usr/src/cmd/audio/audioconvert/main.cc b/usr/src/cmd/audio/audioconvert/main.cc
index 9fa0b401b0..a097d75345 100644
--- a/usr/src/cmd/audio/audioconvert/main.cc
+++ b/usr/src/cmd/audio/audioconvert/main.cc
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
@@ -60,9 +58,8 @@ int Debug = 0;
void init_header(AudioHdr&);
void usage();
-main(
- int argc,
- char *argv[])
+int
+main(int argc, char *argv[])
{
AudioUnixfile* ifp = NULL; // input & output audio objects
AudioUnixfile* ofp = NULL;
@@ -74,7 +71,7 @@ main(
char *out_fmt = NULL; // output fmt string
AudioError err; // for error msgs
int c; // for getopt
- int pflag = 0; // in place flag
+ int pflag = 0; // in place flag
int fflag = 0; // ignore header (force conversion)
int stdin_seen = 0; // already read stdin
int israw = 0; // once we've seen -i, it's raw data
@@ -278,7 +275,7 @@ main(
// Create the file and set the info string.
char *infoString;
- int infoStringLen;
+ int infoStringLen;
infoString = ifp->GetInfostring(infoStringLen);
ofp = create_output_file(outfile, ohdr, ofmt,
infoString);
@@ -336,7 +333,7 @@ main(
// Get the input info string.
char *infoString;
- int infoStringLen;
+ int infoStringLen;
infoString = ifp->GetInfostring(infoStringLen);
ofp = create_output_file(outfile, ohdr, ofmt,
infoString);
@@ -382,7 +379,7 @@ main(
delete(ofp); // close output file
}
- exit(0); // outta here!
+ return (0);
}
diff --git a/usr/src/cmd/auditconfig/auditconfig.c b/usr/src/cmd/auditconfig/auditconfig.c
index f82a22d4d1..197ab63ad3 100644
--- a/usr/src/cmd/auditconfig/auditconfig.c
+++ b/usr/src/cmd/auditconfig/auditconfig.c
@@ -106,8 +106,8 @@ enum commands {
AC_ARG_SET_TEMPORARY
};
-#define AC_KERN_EVENT 0
-#define AC_USER_EVENT 1
+#define AC_KERN_EVENT 0
+#define AC_USER_EVENT 1
#define NONE(s) (!strlen(s) ? gettext("none") : s)
@@ -857,8 +857,8 @@ do_args(char **argv, au_mask_t *mask)
{
char *plugin_str = NULL;
boolean_t plugin_state = B_FALSE;
- char *plugin_att = NULL;
- int plugin_qsize = -1;
+ char *plugin_att = NULL;
+ int plugin_qsize = -1;
plugin_str = *++argv;
if (strcmp(*++argv, "active") == 0) {
@@ -1077,7 +1077,7 @@ static void
do_chkaconf(void)
{
char *namask_cfg;
- au_mask_t pmask, kmask;
+ au_mask_t pmask, kmask;
if (!do_getnaflags_scf(&namask_cfg) || namask_cfg == NULL) {
exit_error(gettext("Could not get configured value."));
@@ -1112,7 +1112,7 @@ do_chkaconf(void)
static void
do_aconf(void)
{
- au_mask_t namask;
+ au_mask_t namask;
char *namask_cfg;
if (!do_getnaflags_scf(&namask_cfg) || namask_cfg == NULL) {
@@ -1400,7 +1400,7 @@ do_getnaflags(void)
static void
do_getpolicy(void)
{
- char policy_str[1024];
+ char policy_str[1024];
uint32_t policy;
if (!temporary_set) {
@@ -2434,7 +2434,7 @@ cond2str(void)
}
/*
- * exit = 0, success
+ * exit = 0, success
* 1, error
* 2, bad zone
*/
@@ -2775,7 +2775,7 @@ print_mask(char *desc, au_mask_t *pmp)
{
char auflags[512];
- if (getauditflagschar(auflags, pmp, NULL) < 0)
+ if (getauditflagschar(auflags, pmp, 0) < 0)
(void) strlcpy(auflags, gettext("unknown"), sizeof (auflags));
(void) printf("%s = %s(0x%x,0x%x)\n",
diff --git a/usr/src/cmd/print/bsd-sysv-commands/cancel.c b/usr/src/cmd/print/bsd-sysv-commands/cancel.c
index 23359d9b5e..a4af36c298 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/cancel.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/cancel.c
@@ -200,7 +200,7 @@ main(int ac, char *av[])
/* Remove first job from printer */
status = papiPrinterListJobs(svc, printer,
- NULL, NULL, 0, &jobs);
+ NULL, 0, 0, &jobs);
if (status != PAPI_OK) {
fprintf(stderr, gettext(
diff --git a/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c b/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
index 1b058ac291..b6f1bc709b 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
@@ -130,7 +130,7 @@ static papi_attribute_t **
parse_cf(papi_service_t svc, char *cf, char **files)
{
papi_attribute_t **list = NULL;
- char previous = NULL;
+ char previous = '\0';
char *entry;
int copies_set = 0;
int copies = 0;
@@ -509,7 +509,7 @@ berkeley_receive_files(papi_service_t svc, FILE *ifp, FILE *ofp, char *printer)
case 0x02: { /* Receive control file */
if (((cf = strchr(buf, ' ')) != NULL) &&
(strlen(cf) > 4)) {
- while ((*cf != NULL) && (isdigit(*cf) == 0))
+ while ((*cf != '\0') && (isdigit(*cf) == 0))
cf++;
rid = atoi(cf);
}
diff --git a/usr/src/cmd/print/conv_fix/conv_fix.c b/usr/src/cmd/print/conv_fix/conv_fix.c
index 2833b106bb..2d12a821ac 100644
--- a/usr/src/cmd/print/conv_fix/conv_fix.c
+++ b/usr/src/cmd/print/conv_fix/conv_fix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -64,7 +62,7 @@ _file_getline(FILE *fp)
continue;
} else {
if ((*tmp == '#') || (*tmp == '\n')) {
- *tmp = NULL;
+ *tmp = '\0';
break;
}
diff --git a/usr/src/cmd/print/lpset/lpset.c b/usr/src/cmd/print/lpset/lpset.c
index 6cb6b05a8a..1b590dec67 100644
--- a/usr/src/cmd/print/lpset/lpset.c
+++ b/usr/src/cmd/print/lpset/lpset.c
@@ -273,18 +273,18 @@ main(int ac, char *av[])
key = *(changes++);
- for (p = key; ((p != NULL) && (*p != NULL)); p++)
+ for (p = key; ((p != NULL) && (*p != '\0')); p++)
if (*p == '=') {
- *p = NULL;
+ *p = '\0';
value = ++p;
break;
} else if (*p == '\\')
p++;
- if ((value != NULL) && (*value == NULL))
+ if ((value != NULL) && (*value == '\0'))
value = NULL;
- if ((key != NULL) && (key[0] != NULL)) {
+ if ((key != NULL) && (key[0] != '\0')) {
if ((value == NULL) &&
(ns_get_value(key, printer_obj) == NULL) &&
(has_equals == 0)) {
diff --git a/usr/src/cmd/sed/main.c b/usr/src/cmd/sed/main.c
index dc3ef02619..2ada22edbb 100644
--- a/usr/src/cmd/sed/main.c
+++ b/usr/src/cmd/sed/main.c
@@ -238,6 +238,8 @@ again:
s = script->s;
state = ST_STRING;
goto again;
+ default:
+ errx(1, "BUG: Unknown script type: %d\n", script->type);
}
/*NOTREACHED*/
diff --git a/usr/src/lib/iconv_modules/common/utf8%ibm.c b/usr/src/lib/iconv_modules/common/utf8%ibm.c
index c85e69306d..98bde56f83 100644
--- a/usr/src/lib/iconv_modules/common/utf8%ibm.c
+++ b/usr/src/lib/iconv_modules/common/utf8%ibm.c
@@ -29,7 +29,7 @@
#include <errno.h>
#include <sys/types.h>
-#include "tab_lookup.h" /* table lookup data types */
+#include "tab_lookup.h" /* table lookup data types */
#define MSB 0x80 /* most significant bit */
#define ONEBYTE 0xff /* right most byte */
@@ -261,13 +261,8 @@ unsigned long *ibm_code;
* Return: > 0 - converted with enough space in output buffer
* = 0 - no space in outbuf
*/
-int utf8_to_ibm(unidx, ibm_code, buf, buflen, st)
-int unidx;
-unsigned long ibm_code;
-char *buf;
-size_t buflen;
-_icv_state *st;
-
+int utf8_to_ibm(int unidx, unsigned long ibm_code, char *buf, size_t buflen,
+ _icv_state *st)
{
unsigned long val; /* IBM value */
char c1, c2, ibm_str[3];
@@ -316,7 +311,7 @@ _icv_state *st;
*buf = ibm_str[0] = c1;
*(buf+1) = ibm_str[1] = c2;
- ibm_str[2] = NULL;
+ ibm_str[2] = '\0';
#ifdef DEBUG
fprintf(stderr, "\t->%x %x<-\n", *buf, *(buf+1));
diff --git a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_HK.hkscs.c b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_HK.hkscs.c
index 6e24d65a31..b397a2856f 100644
--- a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_HK.hkscs.c
+++ b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_HK.hkscs.c
@@ -439,7 +439,7 @@ static int utf8_to_hkscs(int unidx, unsigned long hkscscode, char *buf, size_t b
*buf = hkscs_str[0] = c1;
*(buf+1) = hkscs_str[1] = c2;
- hkscs_str[2] = NULL;
+ hkscs_str[2] = '\0';
}
#ifdef DEBUG
diff --git a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5.c b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5.c
index e7cce94272..ae63dacb2e 100644
--- a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5.c
+++ b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5.c
@@ -458,7 +458,7 @@ static int utf8_to_big5(int unidx, unsigned long big5code, char *buf, size_t buf
*buf = big5_str[0] = c1;
*(buf+1) = big5_str[1] = c2;
- big5_str[2] = NULL;
+ big5_str[2] = '\0';
}
#ifdef DEBUG
diff --git a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5p.c b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5p.c
index e10183c212..254616c294 100644
--- a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5p.c
+++ b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-big5p.c
@@ -361,7 +361,7 @@ static int utf8_to_big5p(int unidx, unsigned long big5pcode, char *buf, size_t b
*buf = big5p_str[0] = c1;
*(buf+1) = big5p_str[1] = c2;
- big5p_str[2] = NULL;
+ big5p_str[2] = '\0';
}
#ifdef DEBUG
diff --git a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-euc.c b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-euc.c
index 085e5a9b89..bac7933fca 100644
--- a/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-euc.c
+++ b/usr/src/lib/iconv_modules/zh/common/UTF-8%zh_TW-euc.c
@@ -397,7 +397,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
static int get_plane_no_by_utf(uint_t unicode,
int *unidx, unsigned long *cnscode)
{
- int ret;
+ int ret;
/* test whether it belongs to private Unicode plane 15 */
if (unicode >= Low_UDA_In_Unicode && unicode <= High_UDA_In_Unicode)
@@ -486,7 +486,7 @@ static int utf8_to_cns(int plane_no, int unidx, unsigned long cnscode,
if ( buflen < 2) goto err;
*buf = cns_str[0] = c1;
*(buf+1) = cns_str[1] = c2;
- cns_str[2] = cns_str[3] = cns_str[4] = NULL;
+ cns_str[2] = cns_str[3] = cns_str[4] = '\0';
ret_size = 2;
break;
case 2:
@@ -509,7 +509,7 @@ static int utf8_to_cns(int plane_no, int unidx, unsigned long cnscode,
*(buf+1) = cns_str[1] = PMASK + plane_no;
*(buf+2) = cns_str[2] = c1;
*(buf+3) = cns_str[3] = c2;
- cns_str[4] = NULL;
+ cns_str[4] = '\0';
ret_size = 4;
break;
}
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-big5%zh_TW-euc.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-big5%zh_TW-euc.c
index 6b2394cbf0..6022084d17 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-big5%zh_TW-euc.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-big5%zh_TW-euc.c
@@ -234,7 +234,7 @@ static int big5_2nd_byte(char inbuf)
static int get_plane_no_by_big5(const char c1, const char c2,
int *unidx, unsigned long *cnscode)
{
- int ret;
+ int ret;
unsigned long big5code;
big5code = (unsigned long) ((c1 & ONEBYTE) << 8) + (c2 & ONEBYTE);
@@ -300,7 +300,7 @@ static int big5_to_cns(int plane_no, int unidx, unsigned long cnscode,
if ( buflen < 2 ) goto err;
*buf = cns_str[0] = c1;
*(buf+1) = cns_str[1] = c2;
- cns_str[2] = cns_str[3] = cns_str[4] = NULL;
+ cns_str[2] = cns_str[3] = cns_str[4] = '\0';
ret_size = 2;
break;
case 2:
@@ -323,7 +323,7 @@ static int big5_to_cns(int plane_no, int unidx, unsigned long cnscode,
*(unsigned char*)(buf+1) = cns_str[1] = PMASK + plane_no;
*(unsigned char*) (buf+2) = cns_str[2] = c1;
*(unsigned char*) (buf+3) = cns_str[3] = c2;
- cns_str[4] = NULL;
+ cns_str[4] = '\0';
ret_size = 4;
break;
}
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%UTF-8.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%UTF-8.c
index 57955c70b5..4c9f0ac6be 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%UTF-8.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%UTF-8.c
@@ -194,7 +194,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
int uconv_num_internal = 0;
st->keepc[1] = (**inbuf);
- st->keepc[2] = st->keepc[3] = NULL;
+ st->keepc[2] = st->keepc[3] = '\0';
n = cns_to_utf8(1, st, *outbuf,
*outbytesleft, &uconv_num_internal);
if (n > 0) {
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-big5.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-big5.c
index bef3fdaac1..c87c9617fa 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-big5.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-big5.c
@@ -153,7 +153,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
} else { /* 2-byte Chinese character - plane #1 */
if (**inbuf & MSB) { /* plane #1 */
st->keepc[1] = (**inbuf);
- st->keepc[2] = st->keepc[3] = NULL;
+ st->keepc[2] = st->keepc[3] = '\0';
n = cns_to_big5(1, st->keepc, *outbuf,
*outbytesleft);
if (n > 0) {
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-iso2022-7.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-iso2022-7.c
index 3b66d25797..889d6cbe11 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-iso2022-7.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-euc%zh_TW-iso2022-7.c
@@ -207,7 +207,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
if (**inbuf & MSB) { /* plane #1 */
st->cstate = C4;
st->keepc[1] = (**inbuf);
- st->keepc[2] = st->keepc[3] = NULL;
+ st->keepc[2] = st->keepc[3] = '\0';
plane_no = 1;
continue; /* should not advance *inbuf */
} else { /* input char doesn't belong
@@ -403,10 +403,10 @@ size_t
_cv_enconv(struct _cv_state *st, char **cvinbuf, size_t *cvinbytesleft,
char **cvoutbuf, size_t *cvoutbytesleft)
{
- register char *inbuf;
- register char *outbuf;
- register size_t insize;
- register size_t outsize;
+ char *inbuf;
+ char *outbuf;
+ size_t insize;
+ size_t outsize;
unsigned char uc;
int i;
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%UTF-8.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%UTF-8.c
index 08f31be7f2..12b3713ea2 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%UTF-8.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%UTF-8.c
@@ -242,7 +242,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
break;
case C6: /* plane #1: 2nd Chinese character */
st->keepc[1] = (char) (**inbuf | MSB);
- st->keepc[2] = st->keepc[3] = NULL;
+ st->keepc[2] = st->keepc[3] = '\0';
n = iso_to_utf8(1, st->keepc, *outbuf,
*outbytesleft);
if (n > 0) {
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-big5.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-big5.c
index 9113b827a2..a2db1a3379 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-big5.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-big5.c
@@ -242,7 +242,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
break;
case C6: /* plane #1: 2nd Chinese character */
st->keepc[1] = (char) (**inbuf | MSB);
- st->keepc[2] = st->keepc[3] = NULL;
+ st->keepc[2] = st->keepc[3] = '\0';
n = iso_to_big5(1, st->keepc, *outbuf, *outbytesleft);
if (n > 0) {
(*outbuf) += n;
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-euc.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-euc.c
index 4fcdb8ee07..a7a45db720 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-euc.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-7%zh_TW-euc.c
@@ -104,7 +104,7 @@ struct _cv_state {
};
extern TWNiconv * aTWNiconv();
-extern void adeTWNiconv(TWNiconv *);
+extern void adeTWNiconv(TWNiconv *);
extern size_t aisotoeuc(TWNiconv *, char **, size_t *, char **, size_t *);
extern void areset(TWNiconv *);
@@ -306,7 +306,7 @@ _icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
break;
case C6: /* plane #1: 2nd Chinese character */
st->keepc[1] = (char) (**inbuf | MSB);
- st->keepc[2] = st->keepc[3] = NULL;
+ st->keepc[2] = st->keepc[3] = '\0';
n = iso_to_cns(1, st->keepc, *outbuf, *outbytesleft);
if (n > 0) {
(*outbuf) += n;
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c
index f0ce18663e..059e014a84 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c
@@ -60,7 +60,7 @@ chinese_to_big5( _iconv_st *st, unsigned char **outbuf, size_t *outbytesleft, in
{
table_t key, *ptr;
- if ( st->SSfunc == NULL && st->SOcharset == 'A') { /* GB2312 */
+ if ( st->SSfunc == NONE && st->SOcharset == 'A') { /* GB2312 */
return gb_to_big5(st, outbuf, outbytesleft);
}
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c
index b1e8f5b7b1..1b1028c528 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c
@@ -54,7 +54,7 @@ static int
chinese_to_euc( _iconv_st *st, unsigned char **outbuf, size_t *outbytesleft, int plane_no )
{
- if ( st->SSfunc == NULL && st->SOcharset == 'A') { /* GB2312 */
+ if ( st->SSfunc == NONE && st->SOcharset == 'A') { /* GB2312 */
return gb_to_euc(st, outbuf, outbytesleft);
}
diff --git a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT.c b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT.c
index 9718178472..0273e05775 100644
--- a/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT.c
+++ b/usr/src/lib/iconv_modules/zh/common/zh_TW-iso2022-CN-EXT.c
@@ -64,9 +64,9 @@ _icv_open()
st->ESCstate = OFF;
st->firstbyte = True;
st->numsav = 0;
- st->SOcharset = NULL; /* no default charset */
- st->SS2charset = NULL; /* no default charset */
- st->SS3charset = NULL; /* no default charset */
+ st->SOcharset = 0; /* no default charset */
+ st->SS2charset = 0; /* no default charset */
+ st->SS3charset = 0; /* no default charset */
st->nonidcount = 0;
st->_errno = 0;
@@ -123,9 +123,9 @@ iso2022_icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
st->ESCstate = OFF;
st->firstbyte = True;
st->numsav = 0;
- st->SOcharset = NULL;
- st->SS2charset = NULL;
- st->SS3charset = NULL;
+ st->SOcharset = 0;
+ st->SS2charset = 0;
+ st->SS3charset = 0;
st->nonidcount = 0;
st->_errno = 0;
return ((size_t) 0);
@@ -182,7 +182,7 @@ iso2022_icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
} else if ( st->ESCstate != OFF ) { /* Continue processing the
escape sequence */
ret = process_esc_seq( **inbuf, st );
- if ( ret == DONE ) { /* ESC seq interpreted correctly.
+ if ( ret == DONE ) { /* ESC seq interpreted correctly.
Switch off the escape machine */
st->ESCstate = OFF;
} else if ( ret == INVALID ){
@@ -207,13 +207,13 @@ iso2022_icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
st->_errno = errno = EILSEQ;
st->nonidcount += 1; /* For this character */
}
- st->numsav = 0; /* Discard the saved characters of
+ st->numsav = 0; /* Discard the saved characters of
invalid sequence */
st->ESCstate = OFF;
} /* more char. needed for escape sequence */
} else if (st->Sfunc == SI) {
/* Switch state to SO only if SOdesignation is set. */
- if ( **inbuf == SO && st->SOcharset != NULL ){
+ if ( **inbuf == SO && st->SOcharset != 0 ){
st->Sfunc = SO;
} else { /* Is ASCII */
n = ascii_to_euc(**inbuf, st, outbuf, outbytesleft );
@@ -268,7 +268,7 @@ process_esc_seq( char c, _iconv_st *st )
case E0:
switch (c){
case SS2LOW:
- if ( st->SS2charset == NULL ){
+ if ( st->SS2charset == 0 ){
/* We do not expect SS2 shift function before
SS2 designation is set */
st->savbuf[0] = ESC;
@@ -281,7 +281,7 @@ process_esc_seq( char c, _iconv_st *st )
st->nonidcount -= 1;
return(DONE);
case SS3LOW:
- if ( st->SS3charset == NULL ){
+ if ( st->SS3charset == 0 ){
/* We do not expect SS3 shift function before
SS3 designation is set */
st->savbuf[0] = ESC;
@@ -384,7 +384,7 @@ iscns( _iconv_st *st )
{
int plane_no = -1;
- if ( st->SSfunc == NULL && st->SOcharset == 'G' )
+ if ( st->SSfunc == NONE && st->SOcharset == 'G' )
plane_no = 1;
else if ( st->SSfunc == SS2 && st->SS2charset == 'H' )
plane_no = 2;
diff --git a/usr/src/ucbcmd/chown/chown.c b/usr/src/ucbcmd/chown/chown.c
index 9567b1d44e..e900a2fb1e 100644
--- a/usr/src/ucbcmd/chown/chown.c
+++ b/usr/src/ucbcmd/chown/chown.c
@@ -25,7 +25,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
@@ -37,8 +37,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* chown [-fR] uid[.gid] file ...
*/
@@ -51,6 +49,7 @@
#include <dirent.h>
#include <grp.h>
#include <errno.h>
+#include <unistd.h>
struct passwd *pwd;
struct passwd *getpwnam();
diff --git a/usr/src/ucbcmd/mkstr/mkstr.c b/usr/src/ucbcmd/mkstr/mkstr.c
index 7dfbdbf0f2..80c4015032 100644
--- a/usr/src/ucbcmd/mkstr/mkstr.c
+++ b/usr/src/ucbcmd/mkstr/mkstr.c
@@ -25,8 +25,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* mkstr - create a string error message file by massaging C source
*
@@ -237,7 +235,7 @@ copystr(void)
}
out:
*cp = 0;
- (void) printf("%d", hashit(buf, 1, NULL));
+ (void) printf("%d", hashit(buf, 1, 0));
}
static int
@@ -254,7 +252,7 @@ inithash(void)
int mesgpt = 0;
rewind(mesgread);
- while (fgetNUL(buf, sizeof (buf), mesgread) != NULL) {
+ while (fgetNUL(buf, sizeof (buf), mesgread) != 0) {
(void) hashit(buf, 0, mesgpt);
mesgpt += strlen(buf) + 2;
}
@@ -315,5 +313,5 @@ fgetNUL(char *obuf, int rmdr, FILE *file)
*buf++ = c;
*buf++ = 0;
(void) getc(file);
- return ((feof(file) || ferror(file)) ? NULL : 1);
+ return ((feof(file) || ferror(file)) ? 0 : 1);
}
diff --git a/usr/src/ucbcmd/tset/tset.c b/usr/src/ucbcmd/tset/tset.c
index 9e520f6a23..b6cdeb223b 100644
--- a/usr/src/ucbcmd/tset/tset.c
+++ b/usr/src/ucbcmd/tset/tset.c
@@ -4,7 +4,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
@@ -543,7 +543,7 @@ main(int argc, char *argv[])
while (--argc >= 0) {
p = *++argv;
if (*p == '-') {
- if (*++p == NULL)
+ if (*++p == '\0')
Report = YES; /* report current terminal type */
else
while (*p)
@@ -560,10 +560,10 @@ main(int argc, char *argv[])
/* FALLTHROUGH */
case 'e': /* erase character */
- if (*p == NULL)
+ if (*p == '\0')
Erase_char = -1;
else {
- if (*p == '^' && p[1] != NULL)
+ if (*p == '^' && p[1] != '\0')
if (*++p == '?')
Erase_char = '\177';
else
@@ -575,10 +575,10 @@ main(int argc, char *argv[])
continue;
case 'i': /* interrupt character */
- if (*p == NULL)
+ if (*p == '\0')
Intr_char = CNTL('C');
else {
- if (*p == '^' && p[1] != NULL)
+ if (*p == '^' && p[1] != '\0')
if (*++p == '?')
Intr_char = '\177';
else
@@ -590,10 +590,10 @@ main(int argc, char *argv[])
continue;
case 'k': /* kill character */
- if (*p == NULL)
+ if (*p == '\0')
Kill_char = CNTL('U');
else {
- if (*p == '^' && p[1] != NULL)
+ if (*p == '^' && p[1] != '\0')
if (*++p == '?')
Kill_char = '\177';
else
@@ -625,7 +625,7 @@ main(int argc, char *argv[])
mapold: Map->Ident = NewType;
Map->Test = ALL;
- if (*p == NULL) {
+ if (*p == '\0') {
p = nextarg(argc--, argv++);
}
Map->Type = p;
@@ -642,7 +642,7 @@ mapold: Map->Ident = NewType;
* illegal syntax will only produce
* weird results.
*/
- if (*p == NULL) {
+ if (*p == '\0') {
p = nextarg(argc--, argv++);
}
if (isalnum(*p)) {
@@ -655,34 +655,34 @@ mapold: Map->Ident = NewType;
Not = NO;
while (!Break)
switch (*p) {
- case NULL:
+ case '\0':
p = nextarg(argc--, argv++);
continue;
case ':': /* mapped type */
- *p++ = NULL;
+ *p++ = '\0';
Break = YES;
continue;
case '>': /* conditional */
Map->Test |= GT;
- *p++ = NULL;
+ *p++ = '\0';
continue;
case '<': /* conditional */
Map->Test |= LT;
- *p++ = NULL;
+ *p++ = '\0';
continue;
case '=': /* conditional */
case '@':
Map->Test |= EQ;
- *p++ = NULL;
+ *p++ = '\0';
continue;
case '!': /* invert conditions */
Not = ~Not;
- *p++ = NULL;
+ *p++ = '\0';
continue;
case 'B': /* Baud rate */
@@ -702,7 +702,7 @@ mapold: Map->Ident = NewType;
if (Not) { /* invert sense of test */
Map->Test = (~(Map->Test))&ALL;
}
- if (*p == NULL) {
+ if (*p == '\0') {
p = nextarg(argc--, argv++);
}
Map->Type = p;
@@ -746,7 +746,7 @@ mapold: Map->Ident = NewType;
continue;
default:
- *p-- = NULL;
+ *p-- = '\0';
fatal("Bad flag -", p);
}
} else {
@@ -1189,7 +1189,7 @@ reportek(char *name, char new, char old, char def)
else
prs(" set to ");
bufp = buf;
- if (tgetstr("kb", &bufp) > (char *)0 && n == buf[0] && buf[1] == NULL)
+ if (tgetstr("kb", &bufp) > (char *)0 && n == buf[0] && buf[1] == '\0')
prs("Backspace\n");
else if (n == 0177)
prs("Delete\n");
@@ -1341,13 +1341,13 @@ makealias(char *buf)
i = 1;
while (*b && *b != ':') {
if (*b == '|') {
- *a++ = NULL;
+ *a++ = '\0';
Alias[i++] = a;
b++;
} else
*a++ = *b++;
}
- *a = NULL;
+ *a = '\0';
Alias[i] = NULL;
#ifdef DEB
for (i = 0; Alias[i]; printf("A:%s\n", Alias[i++]))
@@ -1403,7 +1403,6 @@ wrtermcap(char *bp)
}
*p++ = *bp++;
}
-/* */
while (*bp) {
switch (*bp) {
@@ -1509,7 +1508,7 @@ baudrate(char *p)
while (i < 7 && (isalnum(*p) || *p == '.'))
buf[i++] = *p++;
- buf[i] = NULL;
+ buf[i] = '\0';
for (i = 0; speeds[i].string; i++)
if (sequal(speeds[i].string, buf))
return (speeds[i].speed);
@@ -1529,7 +1528,7 @@ char *type;
#endif
Map = map;
while (Map->Ident) {
- if (*(Map->Ident) == NULL ||
+ if (*(Map->Ident) == '\0' ||
sequal(Map->Ident, type) || isalias(Map->Ident)) {
match = NO;
switch (Map->Test) {
diff --git a/usr/src/uts/common/disp/sysclass.c b/usr/src/uts/common/disp/sysclass.c
index 7323a0fc17..825c6337d2 100644
--- a/usr/src/uts/common/disp/sysclass.c
+++ b/usr/src/uts/common/disp/sysclass.c
@@ -25,9 +25,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
-
-#pragma ident "%Z%%M% %I% %E% SMI" /* from SVr4.0 1.12 */
+/* All Rights Reserved */
#include <sys/types.h>
#include <sys/param.h>
@@ -67,6 +65,7 @@ static int sys_doprio(kthread_t *, cred_t *, int, int *);
static void sys_forkret(kthread_t *, kthread_t *);
static void sys_nullsys();
static pri_t sys_swappri(kthread_t *, int);
+static pri_t sys_globpri(kthread_t *);
static int sys_alloc(void **, int);
struct classfuncs sys_classfuncs = {
@@ -104,7 +103,7 @@ struct classfuncs sys_classfuncs = {
sys_nullsys, /* tick */
setbackdq, /* wakeup */
sys_donice,
- (pri_t (*)())sys_nosys, /* globpri */
+ sys_globpri, /* globpri */
sys_nullsys, /* set_process_group */
sys_nullsys, /* yield */
sys_doprio,
@@ -203,6 +202,13 @@ sys_swappri(t, flags)
return (-1);
}
+/* ARGSUSED */
+static pri_t
+sys_globpri(kthread_t *t __unused)
+{
+ return (-1);
+}
+
static int
sys_nosys()
{
diff --git a/usr/src/uts/common/io/tem_safe.c b/usr/src/uts/common/io/tem_safe.c
index 60ff789fb3..6e01da8ffb 100644
--- a/usr/src/uts/common/io/tem_safe.c
+++ b/usr/src/uts/common/io/tem_safe.c
@@ -579,14 +579,14 @@ tem_safe_selgraph(struct tem_vt_state *tem)
}
break;
- case 30: /* black (grey) foreground */
- case 31: /* red (light red) foreground */
- case 32: /* green (light green) foreground */
- case 33: /* brown (yellow) foreground */
- case 34: /* blue (light blue) foreground */
- case 35: /* magenta (light magenta) foreground */
- case 36: /* cyan (light cyan) foreground */
- case 37: /* white (bright white) foreground */
+ case 30: /* black (grey) foreground */
+ case 31: /* red (light red) foreground */
+ case 32: /* green (light green) foreground */
+ case 33: /* brown (yellow) foreground */
+ case 34: /* blue (light blue) foreground */
+ case 35: /* magenta (light magenta) foreground */
+ case 36: /* cyan (light cyan) foreground */
+ case 37: /* white (bright white) foreground */
tem->tvs_fg_color = param - 30;
tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG;
break;
@@ -602,14 +602,14 @@ tem_safe_selgraph(struct tem_vt_state *tem)
tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG;
break;
- case 40: /* black (grey) background */
- case 41: /* red (light red) background */
- case 42: /* green (light green) background */
- case 43: /* brown (yellow) background */
- case 44: /* blue (light blue) background */
- case 45: /* magenta (light magenta) background */
- case 46: /* cyan (light cyan) background */
- case 47: /* white (bright white) background */
+ case 40: /* black (grey) background */
+ case 41: /* red (light red) background */
+ case 42: /* green (light green) background */
+ case 43: /* brown (yellow) background */
+ case 44: /* blue (light blue) background */
+ case 45: /* magenta (light magenta) background */
+ case 46: /* cyan (light cyan) background */
+ case 47: /* white (bright white) background */
tem->tvs_bg_color = param - 40;
tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG;
break;
@@ -1170,7 +1170,7 @@ tem_safe_parse(struct tem_vt_state *tem, uchar_t ch,
tem->tvs_r_cursor.col, credp, called_from);
tem->tvs_state = A_STATE_START;
return;
- case 'p': /* sunbow */
+ case 'p': /* sunbow */
tem_safe_send_data(tem, credp, called_from);
/*
* Don't set anything if we are
@@ -1191,7 +1191,7 @@ tem_safe_parse(struct tem_vt_state *tem, uchar_t ch,
tem_safe_cls(tem, credp, called_from);
tem->tvs_state = A_STATE_START;
return;
- case 'q': /* sunwob */
+ case 'q': /* sunwob */
tem_safe_send_data(tem, credp, called_from);
/*
* Don't set anything if we are
@@ -1692,8 +1692,8 @@ tem_safe_pix_clear_entire_screen(struct tem_vt_state *tem, cred_t *credp,
nrows = (tems.ts_p_dimension.height + (height - 1))/ height;
ncols = (tems.ts_p_dimension.width + (width - 1))/ width;
- tem_safe_pix_cls_range(tem, 0, nrows, 0, 0, ncols, 0,
- B_FALSE, credp, called_from);
+ tem_safe_pix_cls_range(tem, 0, nrows, tems.ts_p_offset.y, 0, ncols,
+ tems.ts_p_offset.x, B_FALSE, credp, called_from);
/*
* Since the whole screen is cleared, we don't need
diff --git a/usr/src/uts/common/os/pcifm.c b/usr/src/uts/common/os/pcifm.c
index fa6e819a5b..a95686fc54 100644
--- a/usr/src/uts/common/os/pcifm.c
+++ b/usr/src/uts/common/os/pcifm.c
@@ -1440,8 +1440,10 @@ pci_check_ranges(dev_info_t *dip, void *arg)
*/
/*ARGSUSED*/
static void
-pci_target_drain(void *private_p, pci_target_err_t *tgt_err)
+pci_target_drain(void *private_p, const void *err,
+ const errorq_elem_t *arg __unused)
{
+ pci_target_err_t *tgt_err = (pci_target_err_t *)err;
char buf[FM_MAX_CLASS];
/*
@@ -1492,7 +1494,7 @@ pci_targetq_init(void)
*/
if (pci_target_queue == NULL) {
pci_target_queue = errorq_create("pci_target_queue",
- (errorq_func_t)pci_target_drain, (void *)NULL,
+ pci_target_drain, (void *)NULL,
TARGET_MAX_ERRS, sizeof (pci_target_err_t), FM_ERR_PIL,
ERRORQ_VITAL);
if (pci_target_queue == NULL)
diff --git a/usr/src/uts/i86pc/boot/boot_fb.c b/usr/src/uts/i86pc/boot/boot_fb.c
index 4ebf38cb30..4bf6107cef 100644
--- a/usr/src/uts/i86pc/boot/boot_fb.c
+++ b/usr/src/uts/i86pc/boot/boot_fb.c
@@ -492,8 +492,7 @@ boot_fb_eraseline_impl(uint16_t x, uint16_t y)
toffset = x * fb_info.bpp + y * fb_info.pitch;
dst = fb_info.fb + toffset;
- if (fb_info.shadow_fb != NULL)
- sdst = fb_info.shadow_fb + toffset;
+ sdst = fb_info.shadow_fb + toffset;
for (i = 0; i < boot_fb_font.height; i++) {
uint8_t *dest = dst + i * fb_info.pitch;