Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2015 08:23:46 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283196 - head/usr.bin/soelim
Message-ID:  <201505210823.t4L8NkxZ046214@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Thu May 21 08:23:45 2015
New Revision: 283196
URL: https://svnweb.freebsd.org/changeset/base/283196

Log:
  Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN
  
  Submitted by:	schwarze at OpenBSD

Modified:
  head/usr.bin/soelim/soelim.c

Modified: head/usr.bin/soelim/soelim.c
==============================================================================
--- head/usr.bin/soelim/soelim.c	Thu May 21 08:20:42 2015	(r283195)
+++ head/usr.bin/soelim/soelim.c	Thu May 21 08:23:45 2015	(r283196)
@@ -27,10 +27,9 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include <sys/param.h>
-
 #include <ctype.h>
 #include <err.h>
+#include <limits.h>
 #include <stdbool.h>
 #define _WITH_GETLINE
 #include <stdio.h>
@@ -56,7 +55,7 @@ static FILE *
 soelim_fopen(const char *name)
 {
 	FILE *f;
-	char path[MAXPATHLEN];
+	char path[PATH_MAX];
 	size_t i;
 
 	if (strcmp(name, "-") == 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505210823.t4L8NkxZ046214>