summaryrefslogtreecommitdiff
path: root/usr/src/cmd/prstat/prtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/prstat/prtable.c')
-rw-r--r--usr/src/cmd/prstat/prtable.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr/src/cmd/prstat/prtable.c b/usr/src/cmd/prstat/prtable.c
index f94766f786..e0fe3ded13 100644
--- a/usr/src/cmd/prstat/prtable.c
+++ b/usr/src/cmd/prstat/prtable.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -49,7 +48,7 @@ lwpid_init()
(void) memset(&plwp_tbl, 0, sizeof (plwp_t *) * PLWP_TBL_SZ);
}
-static int
+static uid_t
pwd_getid(char *name)
{
struct passwd *pwd;
@@ -60,12 +59,12 @@ pwd_getid(char *name)
}
void
-pwd_getname(int uid, char *name, int length)
+pwd_getname(uid_t uid, char *name, int length)
{
struct passwd *pwd;
if ((pwd = getpwuid(uid)) == NULL) {
- (void) snprintf(name, length, "%d", uid);
+ (void) snprintf(name, length, "%u", uid);
} else {
(void) snprintf(name, length, "%s", pwd->pw_name);
}