X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fstrings.c;h=10ec6c8d8ac9f98a27b47823177c1fd4a543d17f;hp=393d8e7cab3e4b6e968cc395aec3cf67ec8b2a50;hb=06078d3fa68db669ed37178c01873546b4b28745;hpb=8b06e371ed1bce3dd6f37138e6becb5e1a562fe0 diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c index 393d8e7c..10ec6c8d 100644 --- a/ncurses/tinfo/strings.c +++ b/ncurses/tinfo/strings.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2000-2007,2012 Free Software Foundation, Inc. * + * Copyright (c) 2000-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -35,8 +35,9 @@ **/ #include +#include -MODULE_ID("$Id: strings.c,v 1.8 2012/02/22 22:34:31 tom Exp $") +MODULE_ID("$Id: strings.c,v 1.9 2017/08/26 13:16:11 tom Exp $") /**************************************************************************** * Useful string functions (especially for mvcur) @@ -105,7 +106,7 @@ _nc_str_copy(string_desc * dst, string_desc * src) NCURSES_EXPORT(bool) _nc_safe_strcat(string_desc * dst, const char *src) { - if (src != 0) { + if (PRESENT(src)) { size_t len = strlen(src); if (len < dst->s_size) { @@ -126,7 +127,7 @@ _nc_safe_strcat(string_desc * dst, const char *src) NCURSES_EXPORT(bool) _nc_safe_strcpy(string_desc * dst, const char *src) { - if (src != 0) { + if (PRESENT(src)) { size_t len = strlen(src); if (len < dst->s_size) {