aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-11-13 17:52:18 -0800
committerPaul Eggert2013-11-13 17:52:18 -0800
commitd672ac3c611453c624948ed8cc2ced65cadc3400 (patch)
treea5b52d6ff15caf0a755cc0729d29474a5ae4a6a3 /src
parentff6ec81d6dd564080d8407c0a0eae36461b3b75d (diff)
downloademacs-d672ac3c611453c624948ed8cc2ced65cadc3400.tar.gz
emacs-d672ac3c611453c624948ed8cc2ced65cadc3400.zip
Prefer tail calls.
* lib-src/ebrowse.c (xstrdup): * lib-src/etags.c (savenstr): * lwlib/lwlib.c (safe_strdup): * src/xfns.c (xic_create_fontsetname): * src/xrdb.c (gethomedir): Prefer tail calls. * lib-src/etags.c (concat): Omit unnecessary assignment.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xfns.c2
-rw-r--r--src/xrdb.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 08bbe9e69d2..3861449cf5a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-11-14 Paul Eggert <eggert@cs.ucla.edu>
2
3 * xfns.c (xic_create_fontsetname):
4 * xrdb.c (gethomedir): Prefer tail calls.
5
12013-11-12 Paul Eggert <eggert@cs.ucla.edu> 62013-11-12 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper, 8 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
diff --git a/src/xfns.c b/src/xfns.c
index 42e7c2eeec5..46f377042f6 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1750,7 +1750,7 @@ xic_create_fontsetname (const char *base_fontname, int motif)
1750 } 1750 }
1751 } 1751 }
1752 if (motif) 1752 if (motif)
1753 strcat (fontsetname, ":"); 1753 return strcat (fontsetname, ":");
1754 return fontsetname; 1754 return fontsetname;
1755} 1755}
1756#endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */ 1756#endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */
diff --git a/src/xrdb.c b/src/xrdb.c
index 52988f0818a..ea823b2b313 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -234,9 +234,7 @@ gethomedir (void)
234 234
235 copy = xmalloc (strlen (ptr) + 2); 235 copy = xmalloc (strlen (ptr) + 2);
236 strcpy (copy, ptr); 236 strcpy (copy, ptr);
237 strcat (copy, "/"); 237 return strcat (copy, "/");
238
239 return copy;
240} 238}
241 239
242 240