Skip to content

Commit

Permalink
libkvs/lookup: lookup_get_raw use use void **
Browse files Browse the repository at this point in the history
As discussed in flux-framework#1144, function result parameters like
the one in flux_kvs_lookup_get_raw() should probably be
void ** not void *.
  • Loading branch information
garlick committed Aug 8, 2017
1 parent ebfdb01 commit 73dc493
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/common/libkvs/kvs_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ int flux_kvs_lookup_get_unpack (flux_future_t *f, const char *fmt, ...)
return rc;
}

int flux_kvs_lookup_get_raw (flux_future_t *f, void *data, int *len)
int flux_kvs_lookup_get_raw (flux_future_t *f, void **data, int *len)
{
struct lookup_ctx *ctx;

Expand All @@ -271,7 +271,7 @@ int flux_kvs_lookup_get_raw (flux_future_t *f, void *data, int *len)
ctx->val_valid = true;
}
if (data)
*(void **)data = ctx->val_data;
*data = ctx->val_data;
if (len)
*len = ctx->val_len;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/common/libkvs/kvs_lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ flux_future_t *flux_kvs_lookupat (flux_t *h, int flags, const char *key,

int flux_kvs_lookup_get (flux_future_t *f, const char **json_str);
int flux_kvs_lookup_get_unpack (flux_future_t *f, const char *fmt, ...);
int flux_kvs_lookup_get_raw (flux_future_t *f, void *data, int *len);
int flux_kvs_lookup_get_raw (flux_future_t *f, void **data, int *len);

#endif /* !_FLUX_CORE_KVS_LOOKUP_H */

Expand Down

0 comments on commit 73dc493

Please sign in to comment.