From 8084cb63988d1fc11c7307f2b6a071129a0e5be3 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 21 Oct 2013 10:50:09 -0500 Subject: [PATCH] Fix indentation in java-io.cpp This was noticed when copy-editing readBytes into writeBytes. Signed-off-by: Johannes Schindelin --- classpath/java-io.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index d461bb7b0c..a332272afb 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -619,7 +619,7 @@ Java_java_io_File_openDir(JNIEnv* e, jclass, jstring path) #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) d->handle = FindFirstFileW(RUNTIME_ARRAY_BODY(buffer), &(d->data)); #else - d->handle = FindFirstFileExW(RUNTIME_ARRAY_BODY(buffer), FindExInfoStandard, &(d->data), FindExSearchNameMatch, NULL, 0); + d->handle = FindFirstFileExW(RUNTIME_ARRAY_BODY(buffer), FindExInfoStandard, &(d->data), FindExSearchNameMatch, NULL, 0); #endif if (d->handle == INVALID_HANDLE_VALUE) { d->dispose(); @@ -816,16 +816,16 @@ Java_java_io_RandomAccessFile_open(JNIEnv* e, jclass, jstring path, #else int fd = ::open((const char*)chars, flags, 0644); #endif - releaseChars(e, path, chars); - if (fd == -1) { + releaseChars(e, path, chars); + if (fd == -1) { throwNewErrno(e, "java/io/IOException"); - return; + return; } - struct ::stat fileStats; - if(::fstat(fd, &fileStats) == -1) { - ::close(fd); + struct ::stat fileStats; + if(::fstat(fd, &fileStats) == -1) { + ::close(fd); throwNewErrno(e, "java/io/IOException"); - return; + return; } peer = fd; length = fileStats.st_size; @@ -861,8 +861,8 @@ Java_java_io_RandomAccessFile_readBytes(JNIEnv* e, jclass, jlong peer, #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) int fd = (int)peer; if(::lseek(fd, position, SEEK_SET) == -1) { - throwNewErrno(e, "java/io/IOException"); - return -1; + throwNewErrno(e, "java/io/IOException"); + return -1; } uint8_t* dst = reinterpret_cast @@ -872,16 +872,16 @@ Java_java_io_RandomAccessFile_readBytes(JNIEnv* e, jclass, jlong peer, e->ReleasePrimitiveArrayCritical(buffer, dst, 0); if(bytesRead == -1) { - throwNewErrno(e, "java/io/IOException"); - return -1; + throwNewErrno(e, "java/io/IOException"); + return -1; } #else HANDLE hFile = (HANDLE)peer; LARGE_INTEGER lPos; lPos.QuadPart = position; if(!SetFilePointerEx(hFile, lPos, nullptr, FILE_BEGIN)) { - throwNewErrno(e, "java/io/IOException"); - return -1; + throwNewErrno(e, "java/io/IOException"); + return -1; } uint8_t* dst = reinterpret_cast @@ -889,8 +889,8 @@ Java_java_io_RandomAccessFile_readBytes(JNIEnv* e, jclass, jlong peer, DWORD bytesRead = 0; if(!ReadFile(hFile, dst + offset, length, &bytesRead, nullptr)) { - throwNewErrno(e, "java/io/IOException"); - return -1; + throwNewErrno(e, "java/io/IOException"); + return -1; } e->ReleasePrimitiveArrayCritical(buffer, dst, 0); #endif