diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 6fa8d01bd..533ee8117 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -485,16 +485,17 @@ static BOOL tsmf_sample_playback_video(TSMF_SAMPLE* sample) { sprintf_s(buf, sizeof(buf), "/tmp/FreeRDP_Frame_%d.ppm", frame_id); FILE* fp = fopen(buf, "wb"); - if (fp) { - fwrite("P5\n", 1, 3, fp); - sprintf_s(buf, sizeof(buf), "%"PRIu32" %"PRIu32"\n", sample->stream->width, - sample->stream->height); - fwrite(buf, 1, strnlen(buf, sizeof(buf)), fp); - fwrite("255\n", 1, 4, fp); - fwrite(sample->data, 1, sample->stream->width * sample->stream->height, fp); - fflush(fp); - fclose(fp); - } + if (fp) + { + fwrite("P5\n", 1, 3, fp); + sprintf_s(buf, sizeof(buf), "%"PRIu32" %"PRIu32"\n", sample->stream->width, + sample->stream->height); + fwrite(buf, 1, strnlen(buf, sizeof(buf)), fp); + fwrite("255\n", 1, 4, fp); + fwrite(sample->data, 1, sample->stream->width * sample->stream->height, fp); + fflush(fp); + fclose(fp); + } } frame_id++; diff --git a/client/common/client_cliprdr_file.c b/client/common/client_cliprdr_file.c index 3cf65d077..448ca90bf 100644 --- a/client/common/client_cliprdr_file.c +++ b/client/common/client_cliprdr_file.c @@ -1550,7 +1550,7 @@ static void cliprdr_local_file_try_close(CliprdrLocalFile* file, UINT res, UINT6 } if (file->fp) fclose(file->fp); - file->fp = NULL; + file->fp = NULL; } static UINT cliprdr_file_context_server_file_size_request( diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 5529b5993..089af89bb 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -2560,7 +2560,7 @@ static void fill_credential_string(COMMAND_LINE_ARGUMENT_A* args, const char* va if (!arg) return; - if (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT) + if (arg->Flags & COMMAND_LINE_VALUE_PRESENT) FillMemory(arg->Value, strlen(arg->Value), '*'); } diff --git a/libfreerdp/codec/test/TestFreeRDPCodecRemoteFX.c b/libfreerdp/codec/test/TestFreeRDPCodecRemoteFX.c index 29cea99a6..4c430fd56 100644 --- a/libfreerdp/codec/test/TestFreeRDPCodecRemoteFX.c +++ b/libfreerdp/codec/test/TestFreeRDPCodecRemoteFX.c @@ -877,10 +877,10 @@ int TestFreeRDPCodecRemoteFX(int argc, char* argv[]) #if 0 FILE *f = fopen("/tmp/windows.data", "w"); - if (f) { - fwrite(dest, IMG_WIDTH * IMG_HEIGHT, FORMAT_SIZE, f); - fclose(f); - } + if (f) { + fwrite(dest, IMG_WIDTH * IMG_HEIGHT, FORMAT_SIZE, f); + fclose(f); + } #endif if (!fuzzyCompareImage(srefImage, dest, IMG_WIDTH * IMG_HEIGHT))