Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN
Submitted by: schwarze at OpenBSD
This commit is contained in:
parent
0330f102a0
commit
46cc634986
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283196
@ -27,10 +27,9 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <sys/param.h>
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#define _WITH_GETLINE
|
#define _WITH_GETLINE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -56,7 +55,7 @@ static FILE *
|
|||||||
soelim_fopen(const char *name)
|
soelim_fopen(const char *name)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char path[MAXPATHLEN];
|
char path[PATH_MAX];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (strcmp(name, "-") == 0)
|
if (strcmp(name, "-") == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user