view src/lib/safe-memset.c @ 8076:bbfbc84f795c HEAD

Added clock_gettime() compatibility function for systems without it.
author Timo Sirainen <tss@iki.fi>
date Thu, 07 Aug 2008 15:05:40 -0400
parents 7ed926ed7aa4
children b9faf4db2a9f
line wrap: on
line source

/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */

#include "lib.h"
#include "safe-memset.h"

void safe_memset(void *data, int c, size_t size)
{
	volatile unsigned char *p = data;

	for (; size > 0; size--)
		*p++ = (unsigned char)c;
}