diff options
| author | Paul Eggert | 2014-12-25 04:19:17 -0800 |
|---|---|---|
| committer | Paul Eggert | 2014-12-25 15:44:23 -0800 |
| commit | 1e6879dbdb0832427f5c588c89a53a8a80768a00 (patch) | |
| tree | 155493c6e140264c05356c667a1c9547a45e336f /lib-src/pop.c | |
| parent | 8dba53d239f5ac00e930f13b73f59cb5b53ffbd1 (diff) | |
| download | emacs-1e6879dbdb0832427f5c588c89a53a8a80768a00.tar.gz emacs-1e6879dbdb0832427f5c588c89a53a8a80768a00.zip | |
Prefer stpcpy to strcat
* admin/merge-gnulib (GNULIB_MODULES): Add stpcpy.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/stpcpy.c, m4/stpcpy.m4: New files, from gnulib.
* lib-src/ebrowse.c (sym_scope_1, operator_name, open_file):
* lib-src/emacsclient.c (get_server_config, set_local_socket)
(start_daemon_and_retry_set_socket):
* lib-src/etags.c (main, C_entries, relative_filename):
* lib-src/pop.c (sendline):
* lib-src/update-game-score.c (main):
* lwlib/xlwmenu.c (resource_widget_value):
* src/callproc.c (child_setup):
* src/dbusbind.c (xd_signature_cat):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/editfns.c (Fuser_full_name):
* src/frame.c (xrdb_get_resource):
* src/gtkutil.c (xg_get_file_with_chooser):
* src/tparam.c (tparam1):
* src/xfns.c (xic_create_fontsetname):
* src/xrdb.c (gethomedir, get_user_db, get_environ_db):
* src/xsmfns.c (smc_save_yourself_CB):
Rewrite to avoid the need for strcat, typically by using stpcpy
and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms.
* src/doc.c (sibling_etc):
* src/xrdb.c (xdefaults):
Now a top-level static constant.
Diffstat (limited to 'lib-src/pop.c')
| -rw-r--r-- | lib-src/pop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c index ffe16c5f911..70011504a34 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -1397,8 +1397,7 @@ sendline (popserver server, const char *line) | |||
| 1397 | over a few dozen messages, and is a big chunk of the time we | 1397 | over a few dozen messages, and is a big chunk of the time we |
| 1398 | spend fetching mail from a server close by. */ | 1398 | spend fetching mail from a server close by. */ |
| 1399 | buf = alloca (strlen (line) + 3); | 1399 | buf = alloca (strlen (line) + 3); |
| 1400 | strcpy (buf, line); | 1400 | strcpy (stpcpy (buf, line), "\r\n"); |
| 1401 | strcat (buf, "\r\n"); | ||
| 1402 | ret = fullwrite (server->file, buf, strlen (buf)); | 1401 | ret = fullwrite (server->file, buf, strlen (buf)); |
| 1403 | 1402 | ||
| 1404 | if (ret < 0) | 1403 | if (ret < 0) |