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/io/ustdio.c

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 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/io/uscanf_p.c ('k') | source/io/ustream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/io/ustdio.c
diff --git a/source/io/ustdio.c b/source/io/ustdio.c
index 3e6f71765872da99d93690f0dffd9706e925657a..1c2225a9423dd3c374e48ed17c6a089b0b522a55 100644
--- a/source/io/ustdio.c
+++ b/source/io/ustdio.c
@@ -1,7 +1,9 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
- * Copyright (C) 1998-2014, International Business Machines
+ * Copyright (C) 1998-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -296,7 +298,7 @@ u_fputc(UChar32 uc,
int32_t idx = 0;
UBool isError = FALSE;
- U16_APPEND(buf, idx, sizeof(buf)/sizeof(*buf), uc, isError);
+ U16_APPEND(buf, idx, UPRV_LENGTHOF(buf), uc, isError);
if (isError) {
return U_EOF;
}
@@ -428,7 +430,7 @@ ufile_fill_uchar_buffer(UFILE *f)
/* shift the buffer if it isn't empty */
if(dataSize != 0) {
- uprv_memmove(f->fUCBuffer, str->fPos, dataSize * sizeof(UChar)); /* not accessing beyond memory */
+ u_memmove(f->fUCBuffer, str->fPos, dataSize); /* not accessing beyond memory */
}
« no previous file with comments | « source/io/uscanf_p.c ('k') | source/io/ustream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698