commit f8c2e64899efc569b61922235de8be4dd893e67c Author: Robert Hogan robert@roberthogan.net Date: Sun Feb 27 12:21:17 2011 +0000
Fix funny malloc statement --- src/parser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/parser.c b/src/parser.c index c7c6290..8f24be6 100644 --- a/src/parser.c +++ b/src/parser.c @@ -266,7 +266,7 @@ static int handle_path(struct parsedfile *config, int lineno, int nowords, char } else { /* Open up a new serverent, put it on the list */ /* then set the current context */ - if (((int) (newserver = (struct serverent *) malloc(sizeof(struct serverent)))) == -1) + if ((newserver = malloc(sizeof(*newserver))) == NULL) exit(-1);
/* Initialize the structure */
tor-commits@lists.torproject.org