-/* Copyright (c) 2002-2009 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
-/* http://www.inmon.com/technology/sflowlicense.txt */
+/* Copyright (c) 2002-2009 InMon Corp. Licensed under the terms of either the
+ * Sun Industry Standards Source License 1.1, that is available at:
+ * http://host-sflow.sourceforge.net/sissl.html
+ * or the InMon sFlow License, that is available at:
+ * http://www.inmon.com/technology/sflowlicense.txt
+ */
+
+#ifndef __CHECKER__ /* Don't run sparse on anything in this file. */
#include <assert.h>
#include "sflow_api.h"
putNet32(receiver, s->len);
memcpy(receiver->sampleCollector.datap, s->str, s->len);
receiver->sampleCollector.datap += (s->len + 3) / 4; /* pad to 4-byte boundary */
+ if ((s->len % 4) != 0){
+ u_int8_t padding = 4 - (s->len % 4);
+ memset(((u_int8_t*)receiver->sampleCollector.datap)-padding, 0, padding);
+ }
}
inline static u_int32_t stringEncodingLength(SFLString *s) {
sfl_agent_error(receiver->agent, "receiver", msg);
resetSampleCollector(receiver);
}
+
+#endif /* !__CHECKER__ */