aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r--src/org/traccar/helper/Checksum.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/org/traccar/helper/Checksum.java b/src/org/traccar/helper/Checksum.java
index dde174545..815962be0 100644
--- a/src/org/traccar/helper/Checksum.java
+++ b/src/org/traccar/helper/Checksum.java
@@ -195,12 +195,11 @@ public final class Checksum {
}
public static int xor(String string) {
- byte[] bytes = string.getBytes(StandardCharsets.US_ASCII);
- byte sum = 0;
- for (byte b : bytes) {
- sum ^= b;
+ byte checksum = 0;
+ for (byte b : string.getBytes(StandardCharsets.US_ASCII)) {
+ checksum ^= b;
}
- return sum;
+ return checksum;
}
public static String nmea(String msg) {