+2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ebrowse.c (xstrdup):
+ * etags.c (savenstr): Prefer tail calls.
+ * etags.c (concat): Omit unnecessary assignment.
+
2013-10-24 Glenn Morris <rgm@gnu.org>
* Makefile.in ($(DESTDIR)${archlibdir}):
xstrdup (char *s)
{
if (s)
- s = strcpy (xmalloc (strlen (s) + 1), s);
+ return strcpy (xmalloc (strlen (s) + 1), s);
return s;
}
static char *
savenstr (const char *cp, int len)
{
- register char *dp;
-
- dp = xnew (len + 1, char);
- memcpy (dp, cp, len);
+ char *dp = xnew (len + 1, char);
dp[len] = '\0';
- return dp;
+ return memcpy (dp, cp, len);
}
/*
strcpy (result, s1);
strcpy (result + len1, s2);
strcpy (result + len1 + len2, s3);
- result[len1 + len2 + len3] = '\0';
return result;
}
+2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lwlib.c (safe_strdup): Prefer tail calls.
+
2013-11-02 Glenn Morris <rgm@gnu.org>
Use relative filenames in TAGS files.
char *
safe_strdup (const char *s)
{
- char *result;
- if (! s) return 0;
- result = (char *) xmalloc (strlen (s) + 1);
- strcpy (result, s);
- return result;
+ return s ? xstrdup (s) : 0;
}
static void
+2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xfns.c (xic_create_fontsetname):
+ * xrdb.c (gethomedir): Prefer tail calls.
+
2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
* xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
}
}
if (motif)
- strcat (fontsetname, ":");
+ return strcat (fontsetname, ":");
return fontsetname;
}
#endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */
copy = xmalloc (strlen (ptr) + 2);
strcpy (copy, ptr);
- strcat (copy, "/");
-
- return copy;
+ return strcat (copy, "/");
}