X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Firssi%2Fsrc%2Ffe-common%2Fcore%2Ffe-windows.c;fp=apps%2Firssi%2Fsrc%2Ffe-common%2Fcore%2Ffe-windows.c;h=30df327b1f4c04101d1ddfac06ebf5b85358b5f5;hb=18d69a0a1fec438e241bb4f431506ed59a34066b;hp=06621c776a2e83b7eaf435cff6ffc4456505d62c;hpb=f7be6adec0248118cddde9b04522c13cd90568cd;p=silc.git diff --git a/apps/irssi/src/fe-common/core/fe-windows.c b/apps/irssi/src/fe-common/core/fe-windows.c index 06621c77..30df327b 100644 --- a/apps/irssi/src/fe-common/core/fe-windows.c +++ b/apps/irssi/src/fe-common/core/fe-windows.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "module.h" @@ -387,7 +387,7 @@ WINDOW_REC *window_find_item(SERVER_REC *server, const char *name) } if (item == NULL) - return 0; + return NULL; return window_item_window(item); } @@ -574,14 +574,15 @@ static void window_print_daychange(WINDOW_REC *window, struct tm *tm) THEME_REC *theme; TEXT_DEST_REC dest; char *format, str[256]; + int ret; theme = active_win->theme != NULL ? active_win->theme : current_theme; format_create_dest(&dest, NULL, NULL, MSGLEVEL_NEVER, window); format = format_get_text_theme(theme, MODULE_NAME, &dest, TXT_DAYCHANGE); - if (strftime(str, sizeof(str), format, tm) <= 0) - str[0] = '\0'; + ret = strftime(str, sizeof(str), format, tm); g_free(format); + if (ret <= 0) return; printtext_string_window(window, MSGLEVEL_NEVER, str); }