Skip to content
Snippets Groups Projects
Commit b48e884b authored by FlorealRISSO's avatar FlorealRISSO
Browse files

format

parent 5bea42ec
Branches
Tags
4 merge requests!9fix sensor example (doc),!4Amd, Tests, Doc, CI/CD,!2build system (v0), add long options,!1build system (v0), add long options, corrections
......@@ -97,7 +97,7 @@ unsigned int init_network(char *dev, void **ptr)
char buffer2[256];
for (int i = 0; i < NB_SENSOR; i++) {
sprintf(buffer2, 256, filenames[i], dev);
snprintf(buffer2, 256, filenames[i], dev);
state->sources[i] = open(buffer2, O_RDONLY);
}
......
......@@ -47,7 +47,7 @@ char *get_rapl_string(const char *filename)
void append(char *name, int i, size_t buffer_size)
{
size_t name_len = strlen(name);
char* ptr = name + name_len;
char *ptr = name + name_len;
size_t remaining_space = buffer_size - name_len;
snprintf(ptr, remaining_space, "%d", i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment