Tighten scope, fix initialization.

This commit is contained in:
Michael Jumper 2013-12-10 23:12:01 -08:00
parent 7d0e8093eb
commit 647850c8ce

View File

@ -238,9 +238,6 @@ void guac_rdpdr_fs_process_close(guac_rdpdr_device* device,
if (file->bytes_written > 0 && if (file->bytes_written > 0 &&
strncmp(file->absolute_path, "\\Download\\", 10) == 0) { strncmp(file->absolute_path, "\\Download\\", 10) == 0) {
int i;
char c;
/* Get client and stream */ /* Get client and stream */
guac_client* client = device->rdpdr->client; guac_client* client = device->rdpdr->client;
@ -254,6 +251,9 @@ void guac_rdpdr_fs_process_close(guac_rdpdr_device* device,
guac_rdp_download_status* status; guac_rdp_download_status* status;
char* basename; char* basename;
int i;
char c;
/* Associate stream with transfer status */ /* Associate stream with transfer status */
guac_stream* stream = guac_client_alloc_stream(client); guac_stream* stream = guac_client_alloc_stream(client);
stream->data = status = malloc(sizeof(guac_rdp_download_status)); stream->data = status = malloc(sizeof(guac_rdp_download_status));
@ -264,6 +264,7 @@ void guac_rdpdr_fs_process_close(guac_rdpdr_device* device,
guac_rdp_fs_delete((guac_rdp_fs*) device->data, file_id); guac_rdp_fs_delete((guac_rdp_fs*) device->data, file_id);
/* Get basename from absolute path */ /* Get basename from absolute path */
i=0;
basename = file->absolute_path; basename = file->absolute_path;
do { do {