Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2008-04-18 18:59:57 +0000
committerAndrew Niefer2008-04-18 18:59:57 +0000
commit10ea8f0cfcb9ae96d1ca29787d1863609f29afb0 (patch)
tree8d722287c3e4f062985fdd967d34abe2c78112b2 /bundles
parent0f63d9f2509ae6f66ccde74a13c7157112c2233d (diff)
downloadrt.equinox.framework-10ea8f0cfcb9ae96d1ca29787d1863609f29afb0.tar.gz
rt.equinox.framework-10ea8f0cfcb9ae96d1ca29787d1863609f29afb0.tar.xz
rt.equinox.framework-10ea8f0cfcb9ae96d1ca29787d1863609f29afb0.zip
bug 209080 - don't print exit msg on empty exitdata
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipse.c16
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseJNI.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipse.c b/bundles/org.eclipse.equinox.executable/library/eclipse.c
index b2d9ba16b..4fee3877f 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipse.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipse.c
@@ -523,10 +523,7 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
if (exitData != 0) {
errorMsg = exitData;
exitData = NULL;
- if (_tcslen( errorMsg ) == 0) {
- free( errorMsg );
- errorMsg = NULL;
- } else {
+ if (_tcslen( errorMsg ) > 0) {
_TCHAR *str;
if (_tcsncmp(errorMsg, _T_ECLIPSE("<title>"), _tcslen(_T_ECLIPSE("<title>"))) == 0) {
str = _tcsstr(errorMsg, _T_ECLIPSE("</title>"));
@@ -552,10 +549,13 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
errorMsg = malloc( (_tcslen(exitMsg) + _tcslen(msg) + 10) * sizeof(_TCHAR) );
_stprintf( errorMsg, exitMsg, exitCode, msg );
}
- if (!suppressErrors)
- displayMessage( title, errorMsg );
- else
- _ftprintf(stderr, _T_ECLIPSE("%s:\n%s\n"), title, errorMsg);
+
+ if (_tcslen(errorMsg) > 0) {
+ if (!suppressErrors)
+ displayMessage( title, errorMsg );
+ else
+ _ftprintf(stderr, _T_ECLIPSE("%s:\n%s\n"), title, errorMsg);
+ }
free( errorMsg );
free( title );
break;
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c
index 994cd362e..f0e32f1bd 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c
@@ -157,7 +157,7 @@ void setExitData(JNIEnv *env, jstring id, jstring s){
} else {
exitData = malloc((length + 1) * sizeof(_TCHAR*));
_tcsncpy( exitData, data, length);
- exitData[length] = 0;
+ exitData[length] = _T_ECLIPSE('\0');
}
JNI_ReleaseStringChars(env, s, data);
}

Back to the top