From f0b686199805c70780565d736158496af301320f Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Mon, 15 Apr 2002 04:13:14 +0000 Subject: Added an assert() call to detect design errors. --- src/utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index d99abaf..4d98c5f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.23 2002-04-15 02:07:27 rjkaes Exp $ +/* $Id: utils.c,v 1.24 2002-04-15 04:13:14 rjkaes Exp $ * * Misc. routines which are used by the various functions to handle strings * and memory allocation and pretty much anything else we can think of. Also, @@ -387,7 +387,11 @@ strlcat(char *dst, const char *src, size_t size) size_t chomp(char *buffer, size_t length) { - size_t chars = 0; + size_t chars; + + assert(buffer != NULL); + + chars = 0; --length; while (buffer[length] == '\r' || buffer[length] == '\n') { -- cgit v1.2.3