aboutsummaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--screen.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/screen.c b/screen.c
index f86394f..390dfe4 100644
--- a/screen.c
+++ b/screen.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: screen.c,v 1.93 2019/03/08 20:33:30 okan Exp $
+ * $OpenBSD: screen.c,v 1.94 2020/01/22 19:58:35 okan Exp $
*/
#include <sys/types.h>
@@ -275,15 +275,12 @@ void
screen_prop_win_draw(struct screen_ctx *sc, const char *fmt, ...)
{
va_list ap;
- int i;
char *text;
XGlyphInfo extents;
va_start(ap, fmt);
- i = vasprintf(&text, fmt, ap);
+ xvasprintf(&text, fmt, ap);
va_end(ap);
- if (i < 0 || text == NULL)
- err(1, "vasprintf");
XftTextExtentsUtf8(X_Dpy, sc->xftfont, (const FcChar8*)text,
strlen(text), &extents);