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

Issue 17019: Try to consistently use arraysize() with strlcpy(). (Closed)

Created:
11 years, 11 months ago by Dean McNamee
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Try to consistently use arraysize() with strlcpy(). For a char*, sizeof() == arraysize(), so there is nothing wrong with the current code. However I think it's important to be clear that the lcpy() functions work in characters and not bytes. The danger would be accidently using sizeof() with wcslcpy, for example copying some code as an example or modifying old code to use a wchar instead of a char.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -15 lines) Patch
M base/file_util_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/disk_cache/backend_unittest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 9 chunks +10 lines, -9 lines 0 comments Download
M net/disk_cache/mapped_file_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Dean McNamee
11 years, 11 months ago (2008-12-30 13:45:57 UTC) #1
rvargas (doing something else)
11 years, 11 months ago (2008-12-30 18:02:34 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698