From 7c84bfdb5f4ddff0c8660d936520d889917139b5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 15 Dec 2015 21:50:14 +0100 Subject: [PATCH] syscalls.cc: Merge desktop_ini_ext into desktop_ini --- winsup/cygwin/syscalls.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 32cd5fb5a..ba7c743d9 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -216,11 +216,9 @@ stop_transaction (NTSTATUS status, HANDLE old_trans, HANDLE &trans) return status; } -static char desktop_ini[] = +static const char desktop_ini[] = "[.ShellClassInfo]\r\n" - "CLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n"; - -static char desktop_ini_ext[] = + "CLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n" "LocalizedResourceName=@%SystemRoot%\\system32\\shell32.dll,-8964\r\n"; enum bin_status @@ -475,12 +473,9 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) &recycler, status); else { - status = NtWriteFile (tmp_fh, NULL, NULL, NULL, &io, desktop_ini, - sizeof desktop_ini - 1, NULL, NULL); - if (NT_SUCCESS (status)) - status = NtWriteFile (tmp_fh, NULL, NULL, NULL, &io, - desktop_ini_ext, - sizeof desktop_ini_ext - 1, NULL, NULL); + status = NtWriteFile (tmp_fh, NULL, NULL, NULL, &io, + (PVOID) desktop_ini, sizeof desktop_ini - 1, + NULL, NULL); if (!NT_SUCCESS (status)) debug_printf ("NtWriteFile (%S) failed, status = %y", &fname, status);