Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c7b8541e
Commit
c7b8541e
authored
May 02, 2012
by
Jim Meyering
Committed by
Chong Yidong
May 02, 2012
Browse files
* src/xfns.c (x_window): Use xstrdup (Bug#11375).
parent
3f83ace8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/ChangeLog
src/ChangeLog
+2
-0
src/xfns.c
src/xfns.c
+1
-4
No files found.
src/ChangeLog
View file @
c7b8541e
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
* xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
* xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
* xfns.c (x_window): Use xstrdup (Bug#11375).
2012-05-02 Eli Zaretskii <eliz@gnu.org>
2012-05-02 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (pos_visible_p): If already at a newline from the
* xdisp.c (pos_visible_p): If already at a newline from the
...
...
src/xfns.c
View file @
c7b8541e
...
@@ -2439,7 +2439,6 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
...
@@ -2439,7 +2439,6 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
/* Do some needed geometry management. */
/* Do some needed geometry management. */
{
{
ptrdiff_t
len
;
char
*
tem
,
shell_position
[
sizeof
"=x++"
+
4
*
INT_STRLEN_BOUND
(
int
)];
char
*
tem
,
shell_position
[
sizeof
"=x++"
+
4
*
INT_STRLEN_BOUND
(
int
)];
Arg
gal
[
10
];
Arg
gal
[
10
];
int
gac
=
0
;
int
gac
=
0
;
...
@@ -2508,13 +2507,11 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
...
@@ -2508,13 +2507,11 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
}
}
}
}
len
=
strlen
(
shell_position
)
+
1
;
/* We don't free this because we don't know whether
/* We don't free this because we don't know whether
it is safe to free it while the frame exists.
it is safe to free it while the frame exists.
It isn't worth the trouble of arranging to free it
It isn't worth the trouble of arranging to free it
when the frame is deleted. */
when the frame is deleted. */
tem
=
(
char
*
)
xmalloc
(
len
);
tem
=
(
char
*
)
xstrdup
(
shell_position
);
strncpy
(
tem
,
shell_position
,
len
);
XtSetArg
(
gal
[
gac
],
XtNgeometry
,
tem
);
gac
++
;
XtSetArg
(
gal
[
gac
],
XtNgeometry
,
tem
);
gac
++
;
XtSetValues
(
shell_widget
,
gal
,
gac
);
XtSetValues
(
shell_widget
,
gal
,
gac
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment