summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-07-11 18:07:55 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-07-11 18:07:55 +0000
commitd9873d02f5ac253f95bc31c8e11057525e35f834 (patch)
treea7a3d0805a3cb3f79b530e04e5a82a741a9592f3
parente8480c18d3ee5488c9486d18b699b9eb2d669774 (diff)
Kill commented-out wsfont_remove().
Gets rid of an unused free(9) w/o size argument. ok jan@, anton@
-rw-r--r--sys/dev/wsfont/wsfont.c38
-rw-r--r--sys/dev/wsfont/wsfont.h3
2 files changed, 2 insertions, 39 deletions
diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c
index aa8b52f899e..92a165ad540 100644
--- a/sys/dev/wsfont/wsfont.c
+++ b/sys/dev/wsfont/wsfont.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsfont.c,v 1.55 2019/01/09 11:23:32 fcambus Exp $ */
+/* $OpenBSD: wsfont.c,v 1.56 2019/07/11 18:07:54 mpi Exp $ */
/* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */
/*-
@@ -533,42 +533,6 @@ wsfont_add(struct wsdisplay_font *font, int copy)
}
/*
- * Remove a font.
- */
-#ifdef notyet
-int
-wsfont_remove(int cookie)
-{
- struct font *ent;
- int s;
-
- s = splhigh();
-
- if ((ent = wsfont_find0(cookie)) == NULL) {
- splx(s);
- return (-1);
- }
-
- if ((ent->flg & WSFONT_BUILTIN) != 0 || ent->lockcount != 0) {
- splx(s);
- return (-1);
- }
-
- /* Don't free statically allocated font data */
- if ((ent->flg & WSFONT_STATIC) != 0) {
- free(ent->font->data, M_DEVBUF, 0);
- free(ent->font, M_DEVBUF, 0);
- }
-
- /* Remove from list, free entry */
- TAILQ_REMOVE(&list, ent, chain);
- free(ent, M_DEVBUF, 0);
- splx(s);
- return (0);
-}
-#endif
-
-/*
* Lock a given font and return new lockcount. This fails if the cookie
* is invalid, or if the font is already locked and the bit/byte order
* requested by the caller differs.
diff --git a/sys/dev/wsfont/wsfont.h b/sys/dev/wsfont/wsfont.h
index ea11f155c89..9c66149aa2d 100644
--- a/sys/dev/wsfont/wsfont.h
+++ b/sys/dev/wsfont/wsfont.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsfont.h,v 1.11 2017/08/17 20:21:53 kettenis Exp $ */
+/* $OpenBSD: wsfont.h,v 1.12 2019/07/11 18:07:54 mpi Exp $ */
/* $NetBSD: wsfont.h,v 1.12 2000/06/13 13:37:07 ad Exp $ */
/*-
@@ -68,7 +68,6 @@ struct wsdisplay_font;
void wsfont_init(void);
int wsfont_find(const char *, int, int, int);
int wsfont_add(struct wsdisplay_font *, int);
-int wsfont_remove(int);
void wsfont_enum(int (*)(void *, struct wsdisplay_font *), void *);
int wsfont_lock(int, struct wsdisplay_font **, int, int);
int wsfont_unlock(int);