Mercurial > hg > truffle
comparison src/share/vm/compiler/compilerOracle.cpp @ 18695:5281f8e34a4a
Use memmove for overlapping copy
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 16 Dec 2014 08:56:51 -0800 |
parents | 0eba324e27db |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
18694:ec1b0b097d82 | 18695:5281f8e34a4a |
---|---|
396 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) { | 396 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) { |
397 int match = MethodMatcher::Exact; | 397 int match = MethodMatcher::Exact; |
398 while (name[0] == '*') { | 398 while (name[0] == '*') { |
399 match |= MethodMatcher::Suffix; | 399 match |= MethodMatcher::Suffix; |
400 // Copy remaining string plus NUL to the beginning | 400 // Copy remaining string plus NUL to the beginning |
401 memcpy(name, name + 1, strlen(name + 1) + 1); | 401 memmove(name, name + 1, strlen(name + 1) + 1); |
402 } | 402 } |
403 | 403 |
404 if (strcmp(name, "*") == 0) return MethodMatcher::Any; | 404 if (strcmp(name, "*") == 0) return MethodMatcher::Any; |
405 | 405 |
406 size_t len = strlen(name); | 406 size_t len = strlen(name); |