=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- src/usr.bin/tmux/status.c 2012/04/29 07:33:41 1.92 +++ src/usr.bin/tmux/status.c 2012/07/09 09:55:57 1.93 @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.92 2012/04/29 07:33:41 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.93 2012/07/09 09:55:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -515,6 +515,9 @@ char in[BUFSIZ], ch, *iptr, *optr; size_t len; + if (fmt == NULL) + return (xstrdup("")); + len = strftime(in, sizeof in, fmt, localtime(&t)); in[len] = '\0'; @@ -877,8 +880,6 @@ c->prompt_string = status_replace(c, NULL, NULL, NULL, msg, time(NULL), 0); - if (input == NULL) - input = ""; c->prompt_buffer = status_replace(c, NULL, NULL, NULL, input, time(NULL), 0); c->prompt_index = strlen(c->prompt_buffer); @@ -932,8 +933,6 @@ time(NULL), 0); xfree(c->prompt_buffer); - if (input == NULL) - input = ""; c->prompt_buffer = status_replace(c, NULL, NULL, NULL, input, time(NULL), 0); c->prompt_index = strlen(c->prompt_buffer);