> + char timestamp[64]; > + time_t tim = time(NULL); > + strftime(timestamp, 64, "%FT%H.%M.%S", gmtime(&tim)); Please use sizeof(timestamp) to make the code more robust. > + char *path = (char *)malloc((strlen(dir) + 128) * sizeof(*path)); Please use xmalloc(). > + sprintf(path, "%s/lmr_%0*x.%02x.%02x.%x_Rx%X_%s.csv", dir, Please avoid plain sprintf() everywhere and use snprintf() instead. > + if (!csv) > + { > + printf("Error while saving %s\n", path); > + free(path); > + return; > + } We have die(...) for that. > + for (uint8_t j = 0; j < recv->lanes_n; j++) It's better to use plain integer types ("int" or "unsigned int") for loop control variables. Have a nice fortnight -- Martin `MJ' Mareš <mj@xxxxxx> http://mj.ucw.cz/ United Computer Wizards, Prague, Czech Republic, Europe, Earth, Universe