← Commit list

80f5ac701

Eric Andersen
Eric Andersen
2001-11-17
TIMEOUT Duration: 622s

Subject

Patch from Steve Merrifield to make vi use xmalloc

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

$ git checkout -f 80f5ac7016e966c87333c9a776989600313e7e4e
HEAD is now at 80f5ac701 Patch from Steve Merrifield <[email protected]> to make vi use xmalloc

$ git clean -fdx
Removing .menuconfig.log
Removing MCmenu0
Removing MCmenu1
Removing MCmenu2
Removing MCmenu3
Removing MCmenu4
Removing include/config/
Removing scripts/lxdialog/checklist.o
Removing scripts/lxdialog/inputbox.o
Removing scripts/lxdialog/lxdialog
Removing scripts/lxdialog/lxdialog.o
Removing scripts/lxdialog/menubox.o
Removing scripts/lxdialog/msgbox.o
Removing scripts/lxdialog/textbox.o
Removing scripts/lxdialog/util.o
Removing scripts/lxdialog/yesno.o

$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh defconfig
make: *** No rule to make target 'defconfig'.  Stop.

$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh allnoconfig
make: *** No rule to make target 'allnoconfig'.  Stop.

$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh include/bb_config.h
make: *** No rule to make target 'include/bb_config.h'.  Stop.

$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh -j3 V=1

[TIMEOUT]

Commit Diff GitHub →

editors/vi.c+6 -6
@@ -19,7 +19,7 @@
*/
static const char vi_Version[] =
- "$Id: vi.c,v 1.17 2001/11/12 16:57:26 kraai Exp $";
+ "$Id: vi.c,v 1.18 2001/11/17 06:57:42 andersen Exp $";
/*
* To compile for standalone use:
@@ -324,7 +324,7 @@ extern int vi_main(int argc, char **argv)
#ifdef CONFIG_FEATURE_VI_CRASHME
(void) srand((long) getpid());
#endif /* CONFIG_FEATURE_VI_CRASHME */
- status_buffer = (Byte *) malloc(200); // hold messages to user
+ status_buffer = (Byte *) xmalloc(200); // hold messages to user
#ifdef CONFIG_FEATURE_VI_READONLY
vi_readonly = readonly = FALSE;
if (strncmp(argv[0], "view", 4) == 0) {
@@ -2492,7 +2492,7 @@ static Byte *new_screen(int ro, int co)
if (screen != 0)
free(screen);
screensize = ro * co + 8;
- screen = (Byte *) malloc(screensize);
+ screen = (Byte *) xmalloc(screensize);
// initialize the new screen. assume this will be a empty file.
screen_erase();
// non-existant text[] lines start with a tilde (~).
@@ -2510,7 +2510,7 @@ static Byte *new_text(int size)
//text -= 4;
free(text);
}
- text = (Byte *) malloc(size + 8);
+ text = (Byte *) xmalloc(size + 8);
memset(text, '\0', size); // clear new text[]
//text += 4; // leave some room for "oops"
textend = text + size - 1;
@@ -3028,7 +3028,7 @@ static void start_new_cmd_q(Byte c)
if (last_modifying_cmd != 0)
free(last_modifying_cmd);
// get buffer for new cmd
- last_modifying_cmd = (Byte *) malloc(BUFSIZ);
+ last_modifying_cmd = (Byte *) xmalloc(BUFSIZ);
memset(last_modifying_cmd, '\0', BUFSIZ); // clear new cmd queue
// if there is a current cmd count put it in the buffer first
if (cmdcnt > 0)
@@ -3084,7 +3084,7 @@ static Byte *text_yank(Byte * p, Byte * q, int dest) // copy text into a registe
if (t != 0) { // if already a yank register
free(t); // free it
}
- t = (Byte *) malloc(cnt + 1); // get a new register
+ t = (Byte *) xmalloc(cnt + 1); // get a new register
memset(t, '\0', cnt + 1); // clear new text[]
strncpy((char *) t, (char *) p, cnt); // copy text[] into bufer
reg[dest] = t;