summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/idlcmain.cxx3
-rw-r--r--idlc/source/idlcproduce.cxx7
-rw-r--r--idlc/source/scanner.l4
3 files changed, 6 insertions, 8 deletions
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx
index 59a656aed142..038d0a0769d4 100644
--- a/idlc/source/idlcmain.cxx
+++ b/idlc/source/idlcmain.cxx
@@ -85,8 +85,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
OString sysFileName( convertToAbsoluteSystemPath(*i) );
if ( !options.quiet() )
- fprintf(stdout, "Compiling: %s\n",
- (*i).getStr());
+ fprintf(stdout, "Compiling: %s\n", (*i).getStr());
nErrors = compileFile(&sysFileName);
if ( idlc()->getWarningCount() && !options.quiet() )
diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx
index e66bc9229a43..60c5ff463045 100644
--- a/idlc/source/idlcproduce.cxx
+++ b/idlc/source/idlcproduce.cxx
@@ -51,10 +51,9 @@ static bool checkOutputPath(const OString& completeName)
sal_Int32 nIndex = 0;
OString token(sysPathName.getToken(0, SEPARATOR, nIndex));
- const sal_Char* p = token.getStr();
- if (strcmp(p, "..") == 0
- || *(p+1) == ':'
- || strcmp(p, ".") == 0)
+ if (token.startsWith("..")
+ || (token.getLength() >= 2 && token[1] == ':')
+ || token.startsWith("."))
{
buffer.append(token);
buffer.append(SEPARATOR);
diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index 2db7f97f38cf..cfb9cb6d56ed 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -439,7 +439,7 @@ published return IDL_PUBLISHED;
if ( (nIndex = docu.indexOf("/*")) >= 0 || (nIndex = docu.indexOf("///")) >= 0 )
{
if ( 0 != nIndex &&
- (docu.getStr()[nIndex - 1] != '"' && docu.getStr()[nIndex - 1] != ':') )
+ (docu[nIndex - 1] != '"' && docu[nIndex - 1] != ':') )
ErrorHandler::syntaxError(PS_NoState, idlc()->getLineNumber(),
"nested documentation strings are not allowed!");
}
@@ -456,7 +456,7 @@ published return IDL_PUBLISHED;
if ( docu.indexOf("/*") >= 0 || docu.indexOf("//") >= 0 )
{
if ( 0 != nIndex &&
- (docu.getStr()[nIndex - 1] != '"' && docu.getStr()[nIndex - 1] != ':') )
+ (docu[nIndex - 1] != '"' && docu[nIndex - 1] != ':') )
ErrorHandler::syntaxError(PS_NoState, idlc()->getLineNumber(),
"nested documentation strings are not allowed!");
}