diff --git a/src/csv.c b/src/csv.c
index 07728734cc727ab0f8991480fd27c65298aabed1..0cb9bc1a319f9e33f1903f601266e6954c720f44 100644 (file)
--- a/src/csv.c
+++ b/src/csv.c
{
int offset;
int status;
{
int offset;
int status;
- int i;
+ size_t i;
gauge_t *rates = NULL;
assert (0 == strcmp (ds->type, vl->type));
gauge_t *rates = NULL;
assert (0 == strcmp (ds->type, vl->type));
static int csv_create_file (const char *filename, const data_set_t *ds)
{
FILE *csv;
static int csv_create_file (const char *filename, const data_set_t *ds)
{
FILE *csv;
- int i;
+ size_t i;
if (check_create_dir (filename))
return (-1);
if (check_create_dir (filename))
return (-1);
char values[4096];
FILE *csv;
int csv_fd;
char values[4096];
FILE *csv;
int csv_fd;
- struct flock fl;
+ struct flock fl = { 0 };
int status;
if (0 != strcmp (ds->type, vl->type)) {
int status;
if (0 != strcmp (ds->type, vl->type)) {
}
csv_fd = fileno (csv);
}
csv_fd = fileno (csv);
- memset (&fl, '\0', sizeof (fl));
- fl.l_start = 0;
- fl.l_len = 0; /* till end of file */
fl.l_pid = getpid ();
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
fl.l_pid = getpid ();
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;