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

Unified Diff: third_party/crashpad/crashpad/third_party/getopt/getopt.cc

Issue 2236493004: Update Crashpad to 56b14bceefcec03fc11b3222c435522922f65640 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: third_party/crashpad/crashpad/third_party/getopt/getopt.cc
diff --git a/third_party/crashpad/crashpad/third_party/getopt/getopt.cc b/third_party/crashpad/crashpad/third_party/getopt/getopt.cc
index 1f6eaffdb842111d3bc709e476e3421c01322790..137218b999acb858e411a9859f7f3e3f62feb574 100644
--- a/third_party/crashpad/crashpad/third_party/getopt/getopt.cc
+++ b/third_party/crashpad/crashpad/third_party/getopt/getopt.cc
@@ -240,11 +240,11 @@ getopt_internal (int argc, char **argv, char *shortopts,
/* first, is it a long option? */
if (longopts != NULL
- && (memcmp (argv[optind], "--", 2) == 0
+ && (strncmp (argv[optind], "--", 2) == 0
|| (only && argv[optind][0] == '+')) && optwhere == 1)
{
/* handle long options */
- if (memcmp (argv[optind], "--", 2) == 0)
+ if (strncmp (argv[optind], "--", 2) == 0)
optwhere = 2;
longopt_match = -1;
possible_arg = strchr (argv[optind] + optwhere, '=');
@@ -259,8 +259,8 @@ getopt_internal (int argc, char **argv, char *shortopts,
match_chars = (possible_arg - argv[optind]) - optwhere;
for (optindex = 0; longopts[optindex].name != NULL; optindex++)
{
- if (memcmp (argv[optind] + optwhere,
- longopts[optindex].name, match_chars) == 0)
+ if (strncmp (argv[optind] + optwhere,
+ longopts[optindex].name, match_chars) == 0)
{
/* do we have an exact match? */
if (match_chars == strlen (longopts[optindex].name))

Powered by Google App Engine
This is Rietveld 408576698