summaryrefslogtreecommitdiffstats
path: root/paste.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-23 16:19:41 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-23 16:19:41 +0000
commit773b574ea25fabe74fa3715b86fe59b8190620f8 (patch)
treeaaacb82a6613d3ffe60e3f04e17c7229c68afeff /paste.c
parentaf5bc517c0431a2ea23ba8463b7343d527dea374 (diff)
Return -1 on error.
Diffstat (limited to 'paste.c')
-rw-r--r--paste.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/paste.c b/paste.c
index 29f17b37..d3e69eeb 100644
--- a/paste.c
+++ b/paste.c
@@ -1,4 +1,4 @@
-/* $Id: paste.c,v 1.4 2008-08-28 17:45:26 nicm Exp $ */
+/* $Id: paste.c,v 1.5 2009-01-23 16:19:41 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -68,7 +68,7 @@ paste_free_top(struct paste_stack *ps)
struct paste_buffer *pb;
if (ARRAY_LENGTH(ps) == 0)
- return (1);
+ return (-1);
pb = ARRAY_FIRST(ps);
ARRAY_REMOVE(ps, 0);
@@ -85,7 +85,7 @@ paste_free_index(struct paste_stack *ps, u_int idx)
struct paste_buffer *pb;
if (idx >= ARRAY_LENGTH(ps))
- return (1);
+ return (-1);
pb = ARRAY_ITEM(ps, idx);
ARRAY_REMOVE(ps, idx);
@@ -118,7 +118,7 @@ paste_replace(struct paste_stack *ps, u_int idx, const char *data)
struct paste_buffer *pb;
if (idx >= ARRAY_LENGTH(ps))
- return (1);
+ return (-1);
pb = ARRAY_ITEM(ps, idx);
xfree(pb->data);