diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:39:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:39:31 +0000 |
commit | aa0cb4643fc13729e7874a5eb16e9eecd90c1ced (patch) | |
tree | 1b6337f56b8a55bfda6bab69525fe62675d14e0e /usr.sbin/sasyncd/conf.y | |
parent | 6e5d9523d6273368df6377a4db98a9533d11505c (diff) |
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/sasyncd/conf.y')
-rw-r--r-- | usr.sbin/sasyncd/conf.y | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sasyncd/conf.y b/usr.sbin/sasyncd/conf.y index fb3a0b2b365..5be15a4e5e7 100644 --- a/usr.sbin/sasyncd/conf.y +++ b/usr.sbin/sasyncd/conf.y @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.y,v 1.17 2012/12/21 13:53:01 gsoares Exp $ */ +/* $OpenBSD: conf.y,v 1.18 2015/08/20 22:39:29 deraadt Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -33,6 +33,7 @@ #include <ctype.h> #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> #include <pwd.h> @@ -182,8 +183,7 @@ setting : INTERFACE STRING if (duplicate) free($2); else { - peer = (struct syncpeer *)calloc(1, - sizeof *peer); + peer = calloc(1, sizeof *peer); if (!peer) { log_err("config: calloc(1, %lu) " "failed", sizeof *peer); @@ -372,7 +372,7 @@ conf_parse_file(char *cfgfile) goto bad; conflen = st.st_size; - buf = (char *)malloc(conflen + 1); + buf = malloc(conflen + 1); if (!buf) { log_err("malloc(%d) failed", conflen + 1); close(fd); |