Revision: 2842
          http://tmux.svn.sourceforge.net/tmux/?rev=2842&view=rev
Author:   tcunha
Date:     2012-07-11 19:30:01 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------
Sync OpenBSD patchset 1149:

Move a NULL check inside a function, from Tiago Cunha.

Modified Paths:
--------------
    trunk/status.c

Modified: trunk/status.c
===================================================================
--- trunk/status.c      2012-07-11 17:16:25 UTC (rev 2841)
+++ trunk/status.c      2012-07-11 19:30:01 UTC (rev 2842)
@@ -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);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to