modules: pull in most of FreeBSD's module linker changes
[dragonfly.git] / usr.bin / vi / patches / v_ex.c.patch
blob033004ff2ae8e3022a5ba66dabf2ffbed5ea5ec8
1 /* $DragonFly: src/usr.bin/vi/patches/v_ex.c.patch,v 1.1 2006/02/26 17:18:06 dillon Exp $ */
2 --- v_ex.c 2003-06-17 10:46:12.000000000 +0800
3 +++ v_ex.c 2006-02-26 20:05:01.000000000 +0800
4 @@ -198,11 +198,16 @@
5 * Try the alternate file name, then the previous file
6 * name. Use the real name, not the user's current name.
7 */
8 - if ((name = sp->alt_name) == NULL) {
9 + if (sp->alt_name == NULL) {
10 msgq(sp, M_ERR, "180|No previous file to edit");
11 return (1);
14 + if ((name = strdup(sp->alt_name)) == NULL) {
15 + msgq(sp, M_SYSERR, NULL);
16 + return (1);
17 + }
19 /* If autowrite is set, write out the file. */
20 if (file_m1(sp, 0, FS_ALL))
21 return (1);