diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-23 11:33:22 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:31:31 +0200 |
commit | 6e202c432e2f16dfa83a7dc21b759c03623fa394 (patch) | |
tree | 4b3a656b37a78f89ce85082c5e754d83e4c24e45 /proclist.c | |
parent | 0f2bdacd6ad3dbcc905925dee12cb30918c33a11 (diff) | |
download | hurd-6e202c432e2f16dfa83a7dc21b759c03623fa394.tar.gz hurd-6e202c432e2f16dfa83a7dc21b759c03623fa394.tar.bz2 hurd-6e202c432e2f16dfa83a7dc21b759c03623fa394.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |