diff options
author | Anand V. Avati <avati@amp.gluster.com> | 2009-04-11 18:43:35 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-12 11:33:47 +0530 |
commit | e062dd5c2f76106593829ebbb86003de966f00f2 (patch) | |
tree | 3a21acbd96fd215370485802451565f5fbec03a8 /xlators/protocol/server/src/server-helpers.c | |
parent | ad86fba6e22b10b06aa44426c2ab3591c54ed0a7 (diff) |
update protocol/server with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 9a6932f67f8..8c2d5a39d50 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -329,12 +329,11 @@ gf_del_locker (struct _lock_table *table, int32_t gf_direntry_to_bin (dir_entry_t *head, - char **bufferp) + char *buffer) { dir_entry_t *trav = NULL; uint32_t len = 0; uint32_t this_len = 0; - char *buffer = NULL; size_t buflen = -1; char *ptr = NULL; char *tmp_buf = NULL; @@ -349,13 +348,6 @@ gf_direntry_to_bin (dir_entry_t *head, trav = trav->next; } - buffer = CALLOC (1, len); - if (buffer == NULL) { - gf_log ("server", GF_LOG_ERROR, - "failed to allocate memory for buffer"); - goto out; - } - ptr = buffer; trav = head->next; while (trav) { @@ -370,11 +362,9 @@ gf_direntry_to_bin (dir_entry_t *head, trav = trav->next; ptr += this_len; } - if (bufferp) - *bufferp = buffer; + buflen = strlen (buffer); -out: return buflen; } |