diff options
-rw-r--r-- | html.c | 4 | ||||
-rw-r--r-- | mdoc_action.c | 3 | ||||
-rw-r--r-- | term.c | 8 |
3 files changed, 9 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.72 2009/10/30 18:43:24 kristaps Exp $ */ +/* $Id: html.c,v 1.73 2009/10/30 18:50:11 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -673,7 +673,7 @@ html_idcat(char *dst, const char *src, int sz) sz--; for ( ; *src != '\0' && sz > 1; src++) { - ssz = snprintf(dst, sz, "%.2x", *src); + ssz = snprintf(dst, (size_t)sz, "%.2x", *src); sz -= ssz; dst += ssz; } diff --git a/mdoc_action.c b/mdoc_action.c index d0053950..72c0e085 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.46 2009/10/29 04:34:38 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.47 2009/10/30 18:50:11 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -890,6 +890,7 @@ pre_dl(PRE_ARGS) } +/* ARGSUSED */ static int pre_offset(PRE_ARGS) { @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.117 2009/10/30 18:43:24 kristaps Exp $ */ +/* $Id: term.c,v 1.118 2009/10/30 18:50:11 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -543,8 +543,10 @@ buffer(struct termp *p, char c) p->maxcols = 256; s = p->maxcols * 2; p->buf = realloc(p->buf, s); - if (NULL == p->buf) - err(1, "realloc"); /* FIXME: shouldn't be here! */ + if (NULL == p->buf) { + fprintf(stderr, "memory exhausted\n"); + exit(EXIT_FAILURE); + } p->maxcols = s; } p->buf[(int)(p->col)++] = c; |