Mercurial > nomad > experimental
changeset 656:e822d35c9207
objstore: don't abuse arg pointer as a temporary variable
This makes the next commit simpler.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sat, 02 Mar 2019 20:16:19 -0500 |
parents | 9cab2dbc51d2 |
children | 3ca0dfeccd7f |
files | src/objstore/vdev.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/objstore/vdev.c Sat Jan 19 21:38:08 2019 -0500 +++ b/src/objstore/vdev.c Sat Mar 02 20:16:19 2019 -0500 @@ -65,10 +65,11 @@ mem_cache_destroy(vdev_cache); } -static struct objstore_vdev *vdev_alloc(const char *type, const char *path) +static struct objstore_vdev *vdev_alloc(const char *type, const char *_path) { struct objstore_vdev *vdev; struct backend *backend; + char *path; int ret; backend = backend_lookup(type); @@ -80,7 +81,7 @@ if (!vdev) return ERR_PTR(-ENOMEM); - path = strdup(path); + path = strdup(_path); if (!path) { ret = -ENOMEM; goto err;