speed increasse. Only copy as many bytes as necessary. During journal
replay, avoid unnecessary copy (string is discarded). Bug reported by
Thorsten von Eicken Patched by kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1961
a5681a0c-68f1-0310-ab6d-
d61299d08faa
cache_item_t *ci;
/* save it for the journal later */
- strncpy(orig_buf, buffer, sizeof(orig_buf)-1);
+ if (sock != NULL)
+ strncpy(orig_buf, buffer, buffer_size);
status = buffer_get_field (&buffer, &buffer_size, &file);
if (status != 0)