freebsd-dev/sbin/ipf/libipf/getsumd.c
Cy Schubert 44bc301921 ipfilter userland: Style(9) requires a space after return
Reported by:    jrtc27
Fixes:          2582ae5740
MFC after:      1 month
2022-01-03 19:37:25 -08:00

24 lines
377 B
C

/* $FreeBSD$ */
/*
* Copyright (C) 2012 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id$
*/
#include "ipf.h"
char *
getsumd(u_32_t sum)
{
static char sumdbuf[17];
if (sum & NAT_HW_CKSUM)
snprintf(sumdbuf, sizeof(sumdbuf), "hw(%#0x)", sum & 0xffff);
else
snprintf(sumdbuf, sizeof(sumdbuf), "%#0x", sum);
return (sumdbuf);
}