Skip to content

Commit

Permalink
Fix typo in variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Feb 20, 2025
1 parent 24d5c93 commit ab5f849
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tests/support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,14 @@ make_temp_dir()
return NULL;
}

const char *tmplate = "/rnp-gtest-XXXXXX";
char * buffer = (char *) calloc(1, strlen(rltmp) + strlen(tmplate) + 1);
if (buffer == NULL) {
auto atemplate = "/rnp-gtest-XXXXXX";
char *buffer = (char *) calloc(1, strlen(rltmp) + strlen(atemplate) + 1);
if (!buffer) {
return NULL;
}
memcpy(buffer, rltmp, strlen(rltmp));
memcpy(buffer + strlen(rltmp), tmplate, strlen(tmplate));
buffer[strlen(rltmp) + strlen(tmplate)] = '\0';
memcpy(buffer + strlen(rltmp), atemplate, strlen(atemplate));
buffer[strlen(rltmp) + strlen(atemplate)] = '\0';
char *res = mkdtemp(buffer);
if (!res) {
free(buffer);
Expand Down

0 comments on commit ab5f849

Please sign in to comment.