summaryrefslogtreecommitdiff
path: root/monitor_mm.c
diff options
context:
space:
mode:
authormillert@openbsd.org <millert@openbsd.org>2015-02-06 23:21:59 +0000
committerDamien Miller <djm@mindrot.org>2015-02-09 09:28:17 +1100
commitfd36834871d06a03e1ff8d69e41992efa1bbf85f (patch)
tree95390638f8f92dfd017176d558acec1e91a9e3b0 /monitor_mm.c
parent1910a286d7771eab84c0b047f31c0a17505236fa (diff)
upstream commit
SIZE_MAX is standard, we should be using it in preference to the obsolete SIZE_T_MAX. OK miod@ beck@
Diffstat (limited to 'monitor_mm.c')
-rw-r--r--monitor_mm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/monitor_mm.c b/monitor_mm.c
index f224fb67e..50731527c 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_mm.c,v 1.20 2015/01/20 23:14:00 deraadt Exp $ */ 1/* $OpenBSD: monitor_mm.c,v 1.21 2015/02/06 23:21:59 millert Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -35,9 +35,9 @@
35#include <errno.h> 35#include <errno.h>
36#include <stdarg.h> 36#include <stdarg.h>
37#include <stddef.h> 37#include <stddef.h>
38#include <stdint.h>
38#include <stdlib.h> 39#include <stdlib.h>
39#include <string.h> 40#include <string.h>
40#include <limits.h>
41 41
42#include "xmalloc.h" 42#include "xmalloc.h"
43#include "ssh.h" 43#include "ssh.h"
@@ -176,7 +176,7 @@ mm_malloc(struct mm_master *mm, size_t size)
176 176
177 if (size == 0) 177 if (size == 0)
178 fatal("mm_malloc: try to allocate 0 space"); 178 fatal("mm_malloc: try to allocate 0 space");
179 if (size > SIZE_T_MAX - MM_MINSIZE + 1) 179 if (size > SIZE_MAX - MM_MINSIZE + 1)
180 fatal("mm_malloc: size too big"); 180 fatal("mm_malloc: size too big");
181 181
182 size = ((size + (MM_MINSIZE - 1)) / MM_MINSIZE) * MM_MINSIZE; 182 size = ((size + (MM_MINSIZE - 1)) / MM_MINSIZE) * MM_MINSIZE;