summaryrefslogtreecommitdiff
path: root/proclist.c
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-08-23 11:33:22 +0000
committerJeremie Koenig <jk@jk.fr.eu.org>2010-08-30 14:31:31 +0200
commit6e202c432e2f16dfa83a7dc21b759c03623fa394 (patch)
tree4b3a656b37a78f89ce85082c5e754d83e4c24e45 /proclist.c
parent0f2bdacd6ad3dbcc905925dee12cb30918c33a11 (diff)
Detect asprintf's ENOMEM in procfs.c rather than everywhere
* procfs.h: Make CONTENTS_LEN an ssize_t rather than a size_t, and document the change. * procfs.c (procfs_get_contents): Initialize CONTENTS_LEN to a negative value, and fail with ENOMEM if it's still negative after the callback returns. (everywhere): Update to ssize_t. * dircat.c, netfs.c, process.c, procfs_dir.c, proclist.c, rootdir.c: Update to ssize_t and the new GET_CONTENTS semantics.
Diffstat (limited to 'proclist.c')
-rw-r--r--proclist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proclist.c b/proclist.c
index b5acb26..38368fe 100644
--- a/proclist.c
+++ b/proclist.c
@@ -10,7 +10,7 @@
#define PID_STR_SIZE (3 * sizeof (pid_t) + 1)
static error_t
-proclist_get_contents (void *hook, char **contents, size_t *contents_len)
+proclist_get_contents (void *hook, char **contents, ssize_t *contents_len)
{
struct ps_context *pc = hook;
pidarray_t pids;