Skip to content
Snippets Groups Projects
Commit f5df6472 authored by Nicolas "Pixel" Noble's avatar Nicolas "Pixel" Noble
Browse files

Refactor.

parent 94a353aa
No related branches found
No related tags found
No related merge requests found
...@@ -57,15 +57,13 @@ FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) { ...@@ -57,15 +57,13 @@ FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) {
/* Generate a unique filename with our template + temporary path. */ /* Generate a unique filename with our template + temporary path. */
success = GetTempFileNameA(".", prefix, 0, tmp_filename); success = GetTempFileNameA(".", prefix, 0, tmp_filename);
fprintf(stderr, "success = %d\n", success); fprintf(stderr, "success = %d\n", success);
if (!success) goto end;
/* Open a file there. */ if (success) {
result = fopen(tmp_filename, "wb+"); /* Open a file there. */
fprintf(stderr, "result = %p\n", result); result = fopen(tmp_filename, "wb+");
if (result == NULL) goto end; fprintf(stderr, "result = %p\n", result);
}
end: if (result != NULL && tmp_filename_out) {
if (result && tmp_filename_out) {
*tmp_filename_out = gpr_strdup(tmp_filename); *tmp_filename_out = gpr_strdup(tmp_filename);
} }
......
Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9
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