This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new 4000a87 Update dist/ for commit
f29659b7d832f4ec7915557c9d06c52b280019cd
4000a87 is described below
commit 4000a8718a8458e2de52431e849a61657cb877d4
Author: GitHub Actions <[email protected]>
AuthorDate: Tue Aug 29 01:25:17 2023 +0000
Update dist/ for commit f29659b7d832f4ec7915557c9d06c52b280019cd
---
dist/nanoarrow.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/dist/nanoarrow.c b/dist/nanoarrow.c
index fc23c71..264eb96 100644
--- a/dist/nanoarrow.c
+++ b/dist/nanoarrow.c
@@ -2799,10 +2799,8 @@ static int ArrowAssertIncreasingInt32(struct
ArrowBufferView view,
}
for (int64_t i = 1; i < view.size_bytes / (int64_t)sizeof(int32_t); i++) {
- int32_t diff = view.data.as_int32[i] - view.data.as_int32[i - 1];
- if (diff < 0) {
- ArrowErrorSet(error, "[%ld] Expected element size >= 0 but found element
size %ld",
- (long)i, (long)diff);
+ if (view.data.as_int32[i] < view.data.as_int32[i - 1]) {
+ ArrowErrorSet(error, "[%ld] Expected element size >= 0", (long)i);
return EINVAL;
}
}
@@ -2817,10 +2815,8 @@ static int ArrowAssertIncreasingInt64(struct
ArrowBufferView view,
}
for (int64_t i = 1; i < view.size_bytes / (int64_t)sizeof(int64_t); i++) {
- int64_t diff = view.data.as_int64[i] - view.data.as_int64[i - 1];
- if (diff < 0) {
- ArrowErrorSet(error, "[%ld] Expected element size >= 0 but found element
size %ld",
- (long)i, (long)diff);
+ if (view.data.as_int64[i] < view.data.as_int64[i - 1]) {
+ ArrowErrorSet(error, "[%ld] Expected element size >= 0", (long)i);
return EINVAL;
}
}