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

Unified Diff: src/platform.h

Issue 552042: Add doc to OS::StrNCpy (Closed)
Patch Set: clean Created 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index 75e557cb443c0ff87228188c3c92c7fb8b358057..24cb1bdfefd3cb064a3cadbf836981346a3a1b67 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -240,6 +240,11 @@ class OS {
va_list args);
static char* StrChr(char* str, int c);
+
+ // Calls strncpy in POSIX and strncpy_s in Windows. It means that
Mads Ager (chromium) 2010/01/19 16:07:06 I think it would make more sense to change the imp
Søren Thygesen Gjesse 2010/01/19 16:13:06 Then we should probably stick to the strncpy_s sem
+ // depending on platform it may or may not set terminating 0 and
+ // it may or may not check length of dest buffer (dest must fit
+ // n bytes plus 1 terminating byte).
static void StrNCpy(Vector<char> dest, const char* src, size_t n);
// Support for profiler. Can do nothing, in which case ticks
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698