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 /procfs_dir.c | |
parent | 0f2bdacd6ad3dbcc905925dee12cb30918c33a11 (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 'procfs_dir.c')
-rw-r--r-- | procfs_dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/procfs_dir.c b/procfs_dir.c index 4df46695..8ec3f7a5 100644 --- a/procfs_dir.c +++ b/procfs_dir.c @@ -11,7 +11,7 @@ struct procfs_dir_node }; static error_t -procfs_dir_get_contents (void *hook, char **contents, size_t *contents_len) +procfs_dir_get_contents (void *hook, char **contents, ssize_t *contents_len) { static const char dot_dotdot[] = ".\0.."; struct procfs_dir_node *dn = hook; |