Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: source/extra/uconv/uwmsg.c

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/extra/uconv/uconv.cpp ('k') | source/i18n/Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/extra/uconv/uwmsg.c
diff --git a/source/extra/uconv/uwmsg.c b/source/extra/uconv/uwmsg.c
index 67c12885953deb18b983531ed312e1fae2ebeb4e..a182a719a67d1acd73d5da782b388edc833259a6 100644
--- a/source/extra/uconv/uwmsg.c
+++ b/source/extra/uconv/uwmsg.c
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1998-2012, International Business Machines Corporation
+* Copyright (C) 1998-2014, International Business Machines Corporation
* and others. All Rights Reserved.
**********************************************************************
*
@@ -26,8 +26,6 @@
#include <stdio.h>
#include <string.h>
-#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
-
#define BUF_SIZE 128
/* Print a ustring to the specified FILE* in the default codepage */
@@ -127,7 +125,7 @@ U_CFUNC int u_wmsg(FILE *fp, const char *tag, ... )
va_list ap;
#endif
UChar result[4096];
- int32_t resultLength = LENGTHOF(result);
+ int32_t resultLength = UPRV_LENGTHOF(result);
if(gBundle == NULL)
{
@@ -146,7 +144,7 @@ U_CFUNC int u_wmsg(FILE *fp, const char *tag, ... )
#if UCONFIG_NO_FORMATTING
resultLength = sizeof(gNoFormatting) / U_SIZEOF_UCHAR;
- if((msgLen + resultLength) <= LENGTHOF(result)) {
+ if((msgLen + resultLength) <= UPRV_LENGTHOF(result)) {
memcpy(result, msg, msgLen * U_SIZEOF_UCHAR);
memcpy(result + msgLen, gNoFormatting, resultLength);
resultLength += msgLen;
« no previous file with comments | « source/extra/uconv/uconv.cpp ('k') | source/i18n/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698