summaryrefslogtreecommitdiffstats
path: root/term_ps.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-10-16 12:20:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-10-16 12:20:34 +0000
commit855d59ab582ff06a37b6864586bd5d5aa61018a2 (patch)
treeec50e0edd6a8458edd410b827c40dbf7d4a7b786 /term_ps.c
parent14297a71223fc5ff079a17f339ddbf603eaca3bf (diff)
downloadmandoc-855d59ab582ff06a37b6864586bd5d5aa61018a2.tar.gz
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 'term_ps.c')
-rw-r--r--term_ps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/term_ps.c b/term_ps.c
index dd1c0b59..1c89e5c0 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -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);