mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
sysutils/procmap: Fix compilation warnings
Reorder and reformat Makefile to make linters happy
This commit is contained in:
parent
81d0bfffeb
commit
c7746e3ede
@ -1,20 +1,25 @@
|
||||
PORTNAME= procmap
|
||||
PORTVERSION= 1.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils
|
||||
DISTFILES= #empty
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Print the contents of a procfs map file
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
USES= uidfix
|
||||
MAKEFILE= /usr/share/mk/bsd.prog.mk
|
||||
MAKE_ENV+= BINDIR=${PREFIX}/bin MANDIR=${PREFIX}/man/man \
|
||||
PROG=procmap MAN8=procmap.8
|
||||
MAKE_ENV+= BINDIR=${PREFIX}/bin \
|
||||
MAN8=procmap.8 \
|
||||
MANDIR=${PREFIX}/man/man \
|
||||
PROG=procmap
|
||||
|
||||
PLIST_FILES= bin/procmap man/man8/${PORTNAME}.8.gz
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
procmap_files := procmap.c procmap.8
|
||||
PLIST_FILES= bin/procmap \
|
||||
man/man8/${PORTNAME}.8.gz
|
||||
|
||||
procmap_files:= procmap.c procmap.8
|
||||
|
||||
post-extract:
|
||||
cd ${FILESDIR} ; \
|
||||
|
@ -35,8 +35,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* The longest possible path is "/proc/curproc/map". */
|
||||
#define MAXPATH 18
|
||||
@ -86,7 +88,7 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
/* Leave space for a NULL terminator at the end of buf. */
|
||||
if (bytes = read(mfd, buf, size - 1) < 0) {
|
||||
if ((bytes = read(mfd, buf, size - 1)) < 0) {
|
||||
if (errno == EFBIG) {
|
||||
/* Buffer to small; try again. */
|
||||
size <<= 1;
|
||||
|
Loading…
Reference in New Issue
Block a user