diff options
author | Neil <nyamatongwe@gmail.com> | 2013-12-22 17:56:22 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-12-22 17:56:22 +1100 |
commit | 2bf62e817722b4951830fbaa6c66ba88e40e565d (patch) | |
tree | aa69479ef027ef399de434d6cababc61098d83d7 /src/ExternalLexer.cxx | |
parent | 7aecd8b2ced5a46a7b91c975b659fea3c5ffc9f5 (diff) | |
download | scintilla-mirror-2bf62e817722b4951830fbaa6c66ba88e40e565d.tar.gz |
Drop unused field 'name' and minimize scope of variable.
Diffstat (limited to 'src/ExternalLexer.cxx')
-rw-r--r-- | src/ExternalLexer.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx index d1d26201d..682320889 100644 --- a/src/ExternalLexer.cxx +++ b/src/ExternalLexer.cxx @@ -66,14 +66,12 @@ LexerLibrary::LexerLibrary(const char *ModuleName) { GetLexerNameFn GetLexerName = (GetLexerNameFn)(sptr_t)lib->FindFunction("GetLexerName"); GetLexerFactoryFunction fnFactory = (GetLexerFactoryFunction)(sptr_t)lib->FindFunction("GetLexerFactory"); - // Assign a buffer for the lexer name. - char lexname[100]; - strcpy(lexname, ""); - int nl = GetLexerCount(); for (int i = 0; i < nl; i++) { - GetLexerName(i, lexname, 100); + // Assign a buffer for the lexer name. + char lexname[100] = ""; + GetLexerName(i, lexname, sizeof(lexname)); lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL); Catalogue::AddLexerModule(lex); |