summaryrefslogtreecommitdiff
path: root/monitor.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.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.c')
-rw-r--r--monitor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 90db9800b..689586c0f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.141 2015/01/20 23:14:00 deraadt Exp $ */ 1/* $OpenBSD: monitor.c,v 1.142 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 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -39,9 +39,9 @@
39#endif 39#endif
40#include <pwd.h> 40#include <pwd.h>
41#include <signal.h> 41#include <signal.h>
42#include <stdint.h>
42#include <stdlib.h> 43#include <stdlib.h>
43#include <string.h> 44#include <string.h>
44#include <limits.h>
45#include <stdarg.h> 45#include <stdarg.h>
46#include <stdio.h> 46#include <stdio.h>
47#include <unistd.h> 47#include <unistd.h>
@@ -488,7 +488,7 @@ mm_zalloc(struct mm_master *mm, u_int ncount, u_int size)
488 size_t len = (size_t) size * ncount; 488 size_t len = (size_t) size * ncount;
489 void *address; 489 void *address;
490 490
491 if (len == 0 || ncount > SIZE_T_MAX / size) 491 if (len == 0 || ncount > SIZE_MAX / size)
492 fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size); 492 fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size);
493 493
494 address = mm_malloc(mm, len); 494 address = mm_malloc(mm, len);