You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/08/12 19:05:16 UTC

[4/4] activemq-artemis git commit: removing tabs from native

removing tabs from native


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f369142e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f369142e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f369142e

Branch: refs/heads/master
Commit: f369142e28fe0cc3e0f385ae416ee51a142acaa3
Parents: a0cca44
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Aug 12 13:04:49 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Aug 12 13:04:49 2015 -0400

----------------------------------------------------------------------
 ...che_activemq_artemis_jlibaio_LibaioContext.c | 64 ++++++++++----------
 1 file changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f369142e/artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.c
----------------------------------------------------------------------
diff --git a/artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.c b/artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.c
index b6fcdd3..4776966 100644
--- a/artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.c
+++ b/artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.c
@@ -625,44 +625,44 @@ JNIEXPORT jint JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_ge
 JNIEXPORT jlong JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_getSize
   (JNIEnv * env, jclass clazz, jint fd)
 {
-	struct stat statBuffer;
-
-	if (fstat(fd, &statBuffer) < 0)
-	{
-	    throwIOExceptionErrorNo(env, "Cannot determine file size:", errno);
-		return -1l;
-	}
-	return statBuffer.st_size;
+    struct stat statBuffer;
+
+    if (fstat(fd, &statBuffer) < 0)
+    {
+        throwIOExceptionErrorNo(env, "Cannot determine file size:", errno);
+        return -1l;
+    }
+    return statBuffer.st_size;
 }
 
 JNIEXPORT jint JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_getBlockSizeFD
   (JNIEnv * env, jclass clazz, jint fd)
 {
-	struct stat statBuffer;
-
-	if (fstat(fd, &statBuffer) < 0)
-	{
-	    throwIOExceptionErrorNo(env, "Cannot determine file size:", errno);
-		return -1l;
-	}
-	return statBuffer.st_blksize;
+    struct stat statBuffer;
+
+    if (fstat(fd, &statBuffer) < 0)
+    {
+        throwIOExceptionErrorNo(env, "Cannot determine file size:", errno);
+        return -1l;
+    }
+    return statBuffer.st_blksize;
 }
 
 JNIEXPORT jint JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_getBlockSize
   (JNIEnv * env, jclass clazz, jstring path)
 {
     const char* f_path = (*env)->GetStringUTFChars(env, path, 0);
-	struct stat statBuffer;
+    struct stat statBuffer;
 
-	if (stat(f_path, &statBuffer) < 0)
-	{
-	    throwIOExceptionErrorNo(env, "Cannot determine file size:", errno);
-		return -1l;
-	}
+    if (stat(f_path, &statBuffer) < 0)
+    {
+        throwIOExceptionErrorNo(env, "Cannot determine file size:", errno);
+        return -1l;
+    }
 
     (*env)->ReleaseStringUTFChars(env, path, f_path);
 
-	return statBuffer.st_blksize;
+    return statBuffer.st_blksize;
 }
 
 JNIEXPORT void JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_fallocate
@@ -679,17 +679,17 @@ JNIEXPORT void JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_fa
 JNIEXPORT void JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_fill
   (JNIEnv * env, jclass clazz, jint fd, jlong size)
 {
-	void * preAllocBuffer = 0;
-	if (posix_memalign(&preAllocBuffer, 512, size) != 0)
-	{
-	      throwOutOfMemoryError(env);
-	      return;
-	}
-	memset(preAllocBuffer, 0, size);
+    void * preAllocBuffer = 0;
+    if (posix_memalign(&preAllocBuffer, 512, size) != 0)
+    {
+          throwOutOfMemoryError(env);
+          return;
+    }
+    memset(preAllocBuffer, 0, size);
     lseek (fd, 0, SEEK_SET);
     write(fd, preAllocBuffer, size);
-	lseek (fd, 0, SEEK_SET);
-	free (preAllocBuffer);
+    lseek (fd, 0, SEEK_SET);
+    free (preAllocBuffer);
 }
 
 JNIEXPORT void JNICALL Java_org_apache_activemq_artemis_jlibaio_LibaioContext_memsetBuffer