From 724f1f4a6e3698d1a34ca3442a6cb3e890e94a99 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 16 Mar 2010 05:48:07 +0000 Subject: [PATCH] * win32/win32.c (rb_w32_getcwd): remvoed duplicated code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ win32/win32.c | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index df6f75cede..c543f9e033 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Mar 16 14:47:55 2010 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_getcwd): remvoed duplicated code. + Tue Mar 16 14:06:13 2010 Nobuyoshi Nakada * include/ruby/encoding.h (ENC_TO_ENCINDEX): suppress warnings. diff --git a/win32/win32.c b/win32/win32.c index 46a2ce5016..8a348d849d 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3579,7 +3579,6 @@ char * rb_w32_getcwd(char *buffer, int size) { char *p = buffer; - char *bp; int len; len = GetCurrentDirectory(0, NULL); @@ -3610,11 +3609,7 @@ rb_w32_getcwd(char *buffer, int size) return NULL; } - for (bp = p; *bp != '\0'; bp = CharNext(bp)) { - if (*bp == '\\') { - *bp = '/'; - } - } + translate_char(p, '\\', '/'); return p; }