]> granicus.if.org Git - onig/commitdiff
remove xstrncat and define xstrcat
authorkosako <kosako@sofnec.co.jp>
Mon, 18 Apr 2016 05:14:33 +0000 (14:14 +0900)
committerkosako <kosako@sofnec.co.jp>
Mon, 18 Apr 2016 05:14:33 +0000 (14:14 +0900)
src/regerror.c
src/regint.h

index ca17e1d1489c1f333e648c1d28dbea0b46ea21e3..a36c5bfcebc031d1d40ed6c58933d88816e39ef6 100644 (file)
@@ -339,7 +339,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
   need = (pat_end - pat) * 4 + 4;
 
   if (n + need < bufsize) {
-    xstrncat((char* )buf, ": /", bufsize);
+    xstrcat((char* )buf, ": /", bufsize);
     s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf);
 
     p = pat;
index daecf70e87503e6607d51525e0ce5fc9b4e9a18b..5476626d83301daa1faeec0fa0f4ec4c72c4de09 100644 (file)
 #define xalloca     _alloca
 #define xvsnprintf(buf,size,fmt,args)  _vsnprintf_s(buf,size,_TRUNCATE,fmt,args)
 #define xsnprintf   sprintf_s
-#define xstrncat(dest,src,n)   strcat_s(dest,n,src)
+#define xstrcat(dest,src,size)   strcat_s(dest,size,src)
 #else
 #define xalloca     alloca
 #define xvsnprintf  vsnprintf
 #define xsnprintf   snprintf
-#define xstrncat(dest,src,n)   strncat(dest,src,n)
+#define xstrcat(dest,src,size)   strcat(dest,src)
 #endif