diff options
| author | Eli Zaretskii | 2019-08-23 16:00:25 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-08-23 16:00:25 +0300 |
| commit | 4b87169d113a151e5d9d6cf7b0d7cb4fb1d3d2d7 (patch) | |
| tree | 71463aca86a1c169ec44e68ba1fc9eca7ce2e9f9 | |
| parent | c4dd5a73ce3ee80a4e152a48f120495cfa89de52 (diff) | |
| download | emacs-4b87169d113a151e5d9d6cf7b0d7cb4fb1d3d2d7.tar.gz emacs-4b87169d113a151e5d9d6cf7b0d7cb4fb1d3d2d7.zip | |
Avoid a compilation warning in w32.c
* src/w32.c (logon_network_drive): Avoid compilation warning
about strncpy arguments.
| -rw-r--r-- | src/w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -3918,7 +3918,7 @@ logon_network_drive (const char *path) | |||
| 3918 | return; | 3918 | return; |
| 3919 | 3919 | ||
| 3920 | n_slashes = 2; | 3920 | n_slashes = 2; |
| 3921 | strncpy (share, path, MAX_UTF8_PATH); | 3921 | strncpy (share, path, MAX_UTF8_PATH - 1); |
| 3922 | /* Truncate to just server and share name. */ | 3922 | /* Truncate to just server and share name. */ |
| 3923 | for (p = share + 2; *p && p < share + MAX_UTF8_PATH; p++) | 3923 | for (p = share + 2; *p && p < share + MAX_UTF8_PATH; p++) |
| 3924 | { | 3924 | { |