summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/compress/compress.c14
-rw-r--r--usr/src/cmd/dd/dd.c16
-rw-r--r--usr/src/cmd/mkdir/mkdir.c13
-rw-r--r--usr/src/cmd/mv/mv.c7
-rw-r--r--usr/src/cmd/pack/pack.c8
-rw-r--r--usr/src/cmd/pr/pr.c1
-rw-r--r--usr/src/cmd/renice/renice.c4
7 files changed, 34 insertions, 29 deletions
diff --git a/usr/src/cmd/compress/compress.c b/usr/src/cmd/compress/compress.c
index ddbe8c8922..53f505d84d 100644
--- a/usr/src/cmd/compress/compress.c
+++ b/usr/src/cmd/compress/compress.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
@@ -8,11 +13,6 @@
* specifies the terms and conditions for redistribution.
*/
-/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
#pragma ident "%Z%%M% %I% %E% SMI"
/*
@@ -1754,10 +1754,10 @@ cl_block(count_long in_count) /* table clear for block compress */
#endif /* DEBUG */
/* shift will overflow */
- if ((count_long)in_count > (count_long)0x007fffffffffffff) {
+ if ((count_long)in_count > 0x007fffffffffffffLL) {
rat = (count_long)bytes_out >> 8;
if (rat == 0) { /* Don't divide by zero */
- rat = 0x7fffffffffffffff;
+ rat = 0x7fffffffffffffffLL;
} else {
rat = (count_long)in_count / (count_long)rat;
}
diff --git a/usr/src/cmd/dd/dd.c b/usr/src/cmd/dd/dd.c
index 29a6fe2b25..ad357a5fd0 100644
--- a/usr/src/cmd/dd/dd.c
+++ b/usr/src/cmd/dd/dd.c
@@ -19,15 +19,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
/*
@@ -463,10 +463,8 @@ static unsigned char *etoa = svr4_etoa;
static unsigned char *atoibm = svr4_atoibm;
-void
-main(argc, argv)
-int argc;
-char **argv;
+int
+main(int argc, char **argv)
{
unsigned char *ip, *op; /* input and output buffer pointers */
int c; /* character counter */
@@ -1595,6 +1593,8 @@ char **argv;
break;
}
}
+ /* NOTREACHED */
+ return (0);
}
/* match ************************************************************** */
diff --git a/usr/src/cmd/mkdir/mkdir.c b/usr/src/cmd/mkdir/mkdir.c
index c636415493..d473679379 100644
--- a/usr/src/cmd/mkdir/mkdir.c
+++ b/usr/src/cmd/mkdir/mkdir.c
@@ -19,15 +19,16 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
-/* */
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+/* */
+
#pragma ident "%Z%%M% %I% %E% SMI"
/*
@@ -73,7 +74,7 @@ newmode(char *ms, mode_t new_mode, mode_t umsk, char *file, char *path);
#define ALLRWX (S_IRWXU | S_IRWXG | S_IRWXO)
-void
+int
main(int argc, char *argv[])
{
int pflag, errflg, mflag;
@@ -277,7 +278,7 @@ main(int argc, char *argv[])
if (local_errno)
errno = local_errno;
- exit(errno ? 2: 0);
+ return (errno ? 2: 0);
}
/*
diff --git a/usr/src/cmd/mv/mv.c b/usr/src/cmd/mv/mv.c
index 464e1fbcee..507ff30d65 100644
--- a/usr/src/cmd/mv/mv.c
+++ b/usr/src/cmd/mv/mv.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -144,7 +144,7 @@ static int cmdarg; /* command line argument */
static avl_tree_t *stree = NULL; /* source file inode search tree */
-void
+int
main(int argc, char *argv[])
{
int c, i, r, errflg = 0;
@@ -376,7 +376,7 @@ main(int argc, char *argv[])
* Show errors by nonzero exit code.
*/
- exit(r?2:0);
+ return (r?2:0);
}
static int
@@ -902,6 +902,7 @@ cleanup:
return (ret);
}
/*NOTREACHED*/
+ return (ret);
}
static int
diff --git a/usr/src/cmd/pack/pack.c b/usr/src/cmd/pack/pack.c
index 502670e670..fd67a70a3c 100644
--- a/usr/src/cmd/pack/pack.c
+++ b/usr/src/cmd/pack/pack.c
@@ -20,15 +20,14 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Huffman encoding program
@@ -127,6 +126,7 @@ static int mv_xattrs(int, int, char *, int);
/* gather character frequency statistics */
/* return 1 if successful, 0 otherwise */
+int
input(char *source)
{
register int i;
@@ -145,6 +145,7 @@ input(char *source)
/* encode the current file */
/* return 1 if successful, 0 otherwise */
+int
output(char *source)
{
int c, i, inleft;
@@ -341,6 +342,7 @@ packfile(char *source)
return (output(source));
}
+int
main(int argc, char *argv[])
{
extern int optind;
diff --git a/usr/src/cmd/pr/pr.c b/usr/src/cmd/pr/pr.c
index 6cf12e460b..388da75835 100644
--- a/usr/src/cmd/pr/pr.c
+++ b/usr/src/cmd/pr/pr.c
@@ -190,6 +190,7 @@ static wint_t _fgetwc_pr(FILE *, int *);
static size_t freadw(wchar_t *, size_t, FILE *);
+int
main(int argc, char **argv)
{
FILS fstr[NFILES];
diff --git a/usr/src/cmd/renice/renice.c b/usr/src/cmd/renice/renice.c
index 56a97d0753..8920e6b7a4 100644
--- a/usr/src/cmd/renice/renice.c
+++ b/usr/src/cmd/renice/renice.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -95,6 +95,7 @@ static type_t types[] = {
* running.
*/
+int
main(int argc, char *argv[])
{
int c;
@@ -247,7 +248,6 @@ main(int argc, char *argv[])
}
return (errs != 0);
- /* NOTREACHED */
}
static int