summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/term_ps.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2011-10-16 12:18:33 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2011-10-16 12:18:33 +0000
commit70a92ca001f3c5ac3ad8aaaa1d08cbe3848aa2e4 (patch)
tree0de3df9b060f5ff1602249ef5c9ef115fe77084f /usr.bin/mandoc/term_ps.c
parentb1320f761ba378b8c808d806e657e17ac1ac2743 (diff)
Remove a bunch of useless assignments,
and assert that print_bvspace cannot be called on NULL pointers. No change in behaviour, none of these were bugs, but the code becomes easier to understand. Based on a clang report posted by joerg@; ok kristaps@.
Diffstat (limited to 'usr.bin/mandoc/term_ps.c')
-rw-r--r--usr.bin/mandoc/term_ps.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/mandoc/term_ps.c b/usr.bin/mandoc/term_ps.c
index 9d04a917e97..bba77047276 100644
--- a/usr.bin/mandoc/term_ps.c
+++ b/usr.bin/mandoc/term_ps.c
@@ -1,4 +1,4 @@
-/* $Id: term_ps.c,v 1.18 2011/09/18 15:54:48 schwarze Exp $ */
+/* $Id: term_ps.c,v 1.19 2011/10/16 12:18:32 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -488,8 +488,7 @@ pspdf_alloc(char *outopts)
pagey = 356;
} else if (2 != sscanf(pp, "%ux%u", &pagex, &pagey))
fprintf(stderr, "%s: Unknown paper\n", pp);
- } else if (NULL == pp)
- pp = "letter";
+ }
/*
* This MUST be defined before any PNT2AFM or AFM2PNT
@@ -576,7 +575,7 @@ ps_printf(struct termp *p, const char *fmt, ...)
ps_growbuf(p, PS_BUFSLOP);
pos = (int)p->ps->psmargcur;
- len = vsnprintf(&p->ps->psmarg[pos], PS_BUFSLOP, fmt, ap);
+ vsnprintf(&p->ps->psmarg[pos], PS_BUFSLOP, fmt, ap);
va_end(ap);