diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2015-01-20 23:14:00 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-26 23:58:53 +1100 |
commit | 087266ec33c76fc8d54ac5a19efacf2f4a4ca076 (patch) | |
tree | 71f57bb41b61561ebaa13026d8dc5d04d9829b00 /moduli.c | |
parent | 57e783c8ba2c0797f93977e83b2a8644a03065d8 (diff) |
upstream commit
Reduce use of <sys/param.h> and transition to <limits.h>
throughout. ok djm markus
Diffstat (limited to 'moduli.c')
-rw-r--r-- | moduli.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.29 2014/08/21 01:08:52 doug Exp $ */ +/* $OpenBSD: moduli.c,v 1.30 2015/01/20 23:14:00 deraadt Exp $ */ /* * Copyright 1994 Phil Karn <karn@qualcomm.com> * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> @@ -41,7 +41,7 @@ #ifdef WITH_OPENSSL -#include <sys/param.h> +#include <sys/param.h> /* MAX */ #include <sys/types.h> #include <openssl/bn.h> @@ -54,6 +54,7 @@ #include <stdarg.h> #include <time.h> #include <unistd.h> +#include <limits.h> #include "xmalloc.h" #include "dh.h" @@ -449,11 +450,11 @@ static void write_checkpoint(char *cpfile, u_int32_t lineno) { FILE *fp; - char tmp[MAXPATHLEN]; + char tmp[PATH_MAX]; int r; r = snprintf(tmp, sizeof(tmp), "%s.XXXXXXXXXX", cpfile); - if (r == -1 || r >= MAXPATHLEN) { + if (r == -1 || r >= PATH_MAX) { logit("write_checkpoint: temp pathname too long"); return; } |