mirror of
https://github.com/phpv8/v8js.git
synced 2025-03-11 23:28:45 +00:00
remove useless zero-initializations (immediately overridden afterwards)
This commit is contained in:
parent
441f7b7fab
commit
6bbe4d932b
@ -26,9 +26,6 @@ static void v8js_commonjs_split_terms(const char *identifier, std::vector<char *
|
|||||||
{
|
{
|
||||||
char *term = (char *) emalloc(PATH_MAX), *ptr = term;
|
char *term = (char *) emalloc(PATH_MAX), *ptr = term;
|
||||||
|
|
||||||
// Initialise the term string
|
|
||||||
*term = 0;
|
|
||||||
|
|
||||||
while (*identifier > 0) {
|
while (*identifier > 0) {
|
||||||
if (*identifier == '/') {
|
if (*identifier == '/') {
|
||||||
if (ptr > term) {
|
if (ptr > term) {
|
||||||
@ -37,7 +34,6 @@ static void v8js_commonjs_split_terms(const char *identifier, std::vector<char *
|
|||||||
terms.push_back(estrdup(term));
|
terms.push_back(estrdup(term));
|
||||||
|
|
||||||
// Reset term string
|
// Reset term string
|
||||||
memset(term, 0, strlen(term));
|
|
||||||
ptr = term;
|
ptr = term;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user