Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorTorbjörn Svensson2020-10-31 15:26:19 +0000
committerTorbjörn Svensson2020-10-31 19:24:44 +0000
commit3ae7b88630b8410b8e2ad5005417d57ae31ebde1 (patch)
treeac2d26bce213fc423aa4817b6b5be9033c17ad4f /native
parent82bc0b67e54f9dc88d38aee6a1f9cc151635e50f (diff)
downloadorg.eclipse.cdt-3ae7b88630b8410b8e2ad5005417d57ae31ebde1.tar.gz
org.eclipse.cdt-3ae7b88630b8410b8e2ad5005417d57ae31ebde1.tar.xz
org.eclipse.cdt-3ae7b88630b8410b8e2ad5005417d57ae31ebde1.zip
Bug 568079: Add missing bracers
Change-Id: Icd916d224d4900cf2227f868f8b94cdae13c3f6b Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Diffstat (limited to 'native')
-rw-r--r--native/org.eclipse.cdt.native.serial/native_src/serial.c17
-rwxr-xr-xnative/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dllbin381152 -> 381152 bytes
2 files changed, 6 insertions, 11 deletions
diff --git a/native/org.eclipse.cdt.native.serial/native_src/serial.c b/native/org.eclipse.cdt.native.serial/native_src/serial.c
index b38106e770a..fdb2cb85392 100644
--- a/native/org.eclipse.cdt.native.serial/native_src/serial.c
+++ b/native/org.eclipse.cdt.native.serial/native_src/serial.c
@@ -46,11 +46,10 @@
* IOException
*/
#ifndef __MINGW32__
-static void closeAndthrowIOException(int fd, JNIEnv *env, const char *msg)
+static void closeAndthrowIOException(int fd, JNIEnv *env, const char *msg) {
#else
-static void closeAndthrowIOException(HANDLE handle, JNIEnv *env, const char *msg)
+static void closeAndthrowIOException(HANDLE handle, JNIEnv *env, const char *msg) {
#endif
- {
char buff[256];
#ifndef __MINGW32__
sprintf(buff, "%s: %s", msg, strerror(errno));
@@ -342,8 +341,7 @@ JNIEXPORT jlong JNICALL FUNC(open0)(JNIEnv *env, jobject jobj, jstring portName,
}
JNIEXPORT void JNICALL FUNC(close0)
-(JNIEnv *env, jobject jobj, jlong handle)
-{
+(JNIEnv *env, jobject jobj, jlong handle) {
#ifndef __MINGW32__
close(handle);
#else
@@ -435,8 +433,7 @@ JNIEXPORT jint JNICALL FUNC(read1)(JNIEnv *env, jobject jobj, jlong jhandle, jby
}
JNIEXPORT void JNICALL FUNC(write0)
-(JNIEnv *env, jobject jobj, jlong jhandle, jint b)
-{
+(JNIEnv *env, jobject jobj, jlong jhandle, jint b) {
#ifndef __MINGW32__
char buff = b;
write(jhandle, &buff, 1);
@@ -475,8 +472,7 @@ JNIEXPORT void JNICALL FUNC(write0)
#endif
}
-JNIEXPORT void JNICALL FUNC(write1)(JNIEnv *env, jobject jobj, jlong jhandle, jbyteArray bytes, jint offset, jint size)
-{
+JNIEXPORT void JNICALL FUNC(write1)(JNIEnv *env, jobject jobj, jlong jhandle, jbyteArray bytes, jint offset, jint size) {
#ifndef __MINGW32__
while (size > 0) {
jbyte buff[256];
@@ -512,8 +508,7 @@ JNIEXPORT void JNICALL FUNC(write1)(JNIEnv *env, jobject jobj, jlong jhandle, jb
if (GetLastError() != ERROR_IO_PENDING) {
throwIOException(env, "Error writing to port");
return;
- }
- else {
+ } else {
switch (WaitForSingleObject(olp.hEvent, INFINITE)) {
case WAIT_OBJECT_0:
if (!GetOverlappedResult(handle, &olp, &nwritten, FALSE)) {
diff --git a/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll b/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll
index 0e6f6a68212..20117c924eb 100755
--- a/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll
+++ b/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll
Binary files differ

Back to the top