Sync OpenBSD patchset 318:

Give each paste buffer a size member instead of requiring them to be
zero-terminated.
This commit is contained in:
Tiago Cunha
2009-09-07 23:48:54 +00:00
parent 5edc465802
commit c272de7cba
11 changed files with 73 additions and 59 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-list-buffers.c,v 1.11 2009-08-20 11:33:13 tcunha Exp $ */
/* $Id: cmd-list-buffers.c,v 1.12 2009-09-07 23:48:54 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -54,7 +54,7 @@ cmd_list_buffers_exec(struct cmd *self, struct cmd_ctx *ctx)
idx = 0;
while ((pb = paste_walk_stack(&s->buffers, &idx)) != NULL) {
size = strlen(pb->data);
size = pb->size;
/* Translate the first 50 characters. */
len = size;