aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2008-09-02 08:13:20 +0000
committerAndreas Schwab2008-09-02 08:13:20 +0000
commit7a3cddefca08dcdf93bddb81f21558d53ae6c2e4 (patch)
treeaf928d45b5c25f5087e6f39e77c689d86d06c0ae
parent9850eff524bd0747a9561f3b4c90dfc3749f4ecb (diff)
downloademacs-7a3cddefca08dcdf93bddb81f21558d53ae6c2e4.tar.gz
emacs-7a3cddefca08dcdf93bddb81f21558d53ae6c2e4.zip
(Fexpand_file_name): Remove unused variables.
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fileio.c8
2 files changed, 4 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e8e50319c12..6181aeb59dc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12008-09-02 Andreas Schwab <schwab@suse.de>
2
3 * fileio.c (Fexpand_file_name): Remove unused variables.
4
12008-09-02 Eli Zaretskii <eliz@gnu.org> 52008-09-02 Eli Zaretskii <eliz@gnu.org>
2 6
3 * fileio.c (Fexpand_file_name): Copy argument `name' into local 7 * fileio.c (Fexpand_file_name): Copy argument `name' into local
diff --git a/src/fileio.c b/src/fileio.c
index ad8f7d7a538..9c6b98d83f5 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -824,7 +824,6 @@ See also the function `substitute-in-file-name'. */)
824 /* These point to SDATA and need to be careful with string-relocation 824 /* These point to SDATA and need to be careful with string-relocation
825 during GC (via DECODE_FILE). */ 825 during GC (via DECODE_FILE). */
826 unsigned char *nm, *newdir; 826 unsigned char *nm, *newdir;
827 int nm_in_name;
828 /* This should only point to alloca'd data. */ 827 /* This should only point to alloca'd data. */
829 unsigned char *target; 828 unsigned char *target;
830 829
@@ -930,11 +929,9 @@ See also the function `substitute-in-file-name'. */)
930 } 929 }
931 930
932 nm = SDATA (name); 931 nm = SDATA (name);
933 nm_in_name = 1;
934 932
935 /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */ 933 /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
936 nm = strcpy (alloca (strlen (nm) + 1), nm); 934 nm = strcpy (alloca (strlen (nm) + 1), nm);
937 nm_in_name = 0;
938 935
939#ifdef DOS_NT 936#ifdef DOS_NT
940 /* Note if special escape prefix is present, but remove for now. */ 937 /* Note if special escape prefix is present, but remove for now. */
@@ -1077,13 +1074,8 @@ See also the function `substitute-in-file-name'. */)
1077 tem = build_string (newdir); 1074 tem = build_string (newdir);
1078 if (!STRING_MULTIBYTE (tem)) 1075 if (!STRING_MULTIBYTE (tem))
1079 { 1076 {
1080 /* FIXME: DECODE_FILE may GC, which may move SDATA(name),
1081 after which `nm' won't point to the right place any more. */
1082 int offset = nm - SDATA (name);
1083 hdir = DECODE_FILE (tem); 1077 hdir = DECODE_FILE (tem);
1084 newdir = SDATA (hdir); 1078 newdir = SDATA (hdir);
1085 if (nm_in_name)
1086 nm = SDATA (name) + offset;
1087 } 1079 }
1088#ifdef DOS_NT 1080#ifdef DOS_NT
1089 collapse_newdir = 0; 1081 collapse_newdir = 0;