Skip to content
Snippets Groups Projects
Commit 3a470ddb authored by Alexandru-Daniel BARBU's avatar Alexandru-Daniel BARBU
Browse files

Merge branch 'solutions' into 'master'

Fix linter 3.

See merge request !10
parents ff66266b f319044a
No related branches found
No related tags found
1 merge request!10Fix linter 3.
Pipeline #93834 passed
......@@ -67,14 +67,16 @@ int everyone_is_finished(void)
return 1;
}
#define SS "%s %016lx %lu\n"
#define WW writers
#define SPRT snprintf
void print_results_to_file(void)
{
for (int i = 0; i < num_of_threads; i++) {
char out_buf[PKT_SZ];
int len = snprintf(out_buf, 256, "%s %016lx %lu\n",
RES_TO_STR(writers[i].rez), writers[i].hash, writers[i].timestamp);
char otbf[PKT_SZ];
int len = SPRT(otbf, 256, SS, RES_TO_STR(WW[i].rez), WW[i].hash, WW[i].timestamp);
write(out_file_fd, out_buf, len);
write(out_file_fd, otbf, len);
}
}
......
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment