minor checksum changes
main change is checksum of zero buffer is now 0 instead of
the equivalent, but technically incorrect 0xFFFF.
Test: TreeHugger
Bug: 265591307
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1a8b0ace704009f82d3b7ad1c299bf8a6d8964d8
diff --git a/staticlibs/native/ip_checksum/checksum.h b/staticlibs/native/ip_checksum/checksum.h
index 868217c..87393c9 100644
--- a/staticlibs/native/ip_checksum/checksum.h
+++ b/staticlibs/native/ip_checksum/checksum.h
@@ -12,11 +12,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- * checksum.h - checksum functions
*/
-#ifndef __CHECKSUM_H__
-#define __CHECKSUM_H__
+#pragma once
#include <netinet/ip.h>
#include <netinet/ip6.h>
@@ -30,5 +27,3 @@
uint32_t ipv4_pseudo_header_checksum(const struct iphdr* ip, uint16_t len);
uint16_t ip_checksum_adjust(uint16_t checksum, uint32_t old_hdr_sum, uint32_t new_hdr_sum);
-
-#endif /* __CHECKSUM_H__ */