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

Unified Diff: base/file_util_posix.cc

Issue 17019: Try to consistently use arraysize() with strlcpy(). (Closed)
Patch Set: Created 12 years 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 | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index a05b05352f907c437425af7f80ff6257b40ab9bb..3bab4d17f2be77c36cbb82a21134003d41671f1a 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -460,7 +460,7 @@ FilePath FileEnumerator::Next() {
// Start a new find operation.
int ftsflags = FTS_LOGICAL;
char top_dir[PATH_MAX];
- base::strlcpy(top_dir, root_path_.value().c_str(), sizeof(top_dir));
+ base::strlcpy(top_dir, root_path_.value().c_str(), arraysize(top_dir));
char* dir_list[2] = { top_dir, NULL };
fts_ = fts_open(dir_list, ftsflags, NULL);
if (!fts_)
« no previous file with comments | « no previous file | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698