- Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
(-)remove the inclusions of <utmp.h>.
This commit is contained in:
parent
247ac241fa
commit
a755f1c9d0
@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <utmp.h>
|
||||
|
||||
#include "ps.h"
|
||||
|
||||
@ -75,7 +74,7 @@ int utime(), stime(), ixrss(), idrss(), isrss();
|
||||
#define UIDLEN 5
|
||||
#define PIDFMT "d"
|
||||
#define PIDLEN 5
|
||||
#define USERLEN UT_NAMESIZE
|
||||
#define USERLEN (MAXLOGNAME - 1)
|
||||
|
||||
static VAR var[] = {
|
||||
{"%cpu", "%CPU", NULL, 0, pcpu, NULL, 4, 0, CHAR, NULL, 0},
|
||||
|
@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <utmp.h>
|
||||
|
||||
#include "lomac.h"
|
||||
#include "ps.h"
|
||||
@ -419,7 +418,7 @@ main(int argc, char *argv[])
|
||||
uid_t *
|
||||
getuids(const char *arg, int *nuids)
|
||||
{
|
||||
char name[UT_NAMESIZE + 1];
|
||||
char name[MAXLOGNAME];
|
||||
struct passwd *pwd;
|
||||
uid_t *uids, *moreuids;
|
||||
int alloc;
|
||||
|
Loading…
Reference in New Issue
Block a user