Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/mono/mono/metadata/assembly.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,10 +2139,8 @@ mono_assembly_request_load_from (MonoImage *image, const char *fname,
gchar *tmp_fn;

tmp_fn = g_strdup (fname);
for (size_t i = strlen (tmp_fn) - 1; i >= 0; i--) {
if (tmp_fn [i] == '/')
tmp_fn [i] = '\\';
}

g_strdelimit (tmp_fn, '/', '\\');

base_dir = absolute_dir (tmp_fn);
g_free (tmp_fn);
Expand Down
4 changes: 1 addition & 3 deletions src/mono/mono/metadata/icall.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ is_generic_parameter (MonoType *type)
static void
mono_icall_make_platform_path (gchar *path)
{
for (size_t i = strlen (path); i > 0; i--)
if (path [i-1] == '\\')
path [i-1] = '/';
g_strdelimit (path, '\\', '/');
}

static const gchar *
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/w32handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ mono_w32handle_ops_prewait (MonoW32Handle *handle_data)
static void
mono_w32handle_unlock_handles (MonoW32Handle **handles_data, gsize nhandles)
{
for (gsize i = nhandles - 1; i >= 0; i--) {
for (int i = ((int)nhandles - 1); i >= 0; i--) {
if (!handles_data [i])
continue;
mono_w32handle_unlock (handles_data [i]);
Comment on lines +511 to 514
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we can keep gsize here like this.

Suggested change
for (int i = ((int)nhandles - 1); i >= 0; i--) {
if (!handles_data [i])
continue;
mono_w32handle_unlock (handles_data [i]);
for (gsize i = nhandles; i > 0; i--) {
if (!handles_data [i - 1])
continue;
mono_w32handle_unlock (handles_data [i - 1]);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just restored old behavior, you could argue if it should be reverse at all, also discovered that this function is not even called, so occurs to be dead code. Will remove complete instance in a different PR, but lets this one stay for now so tests can run and we can unblock the issues the other fixes in this PR should resolve.

Expand Down