mirror of
https://github.com/ceph/go-ceph
synced 2025-02-18 11:46:52 +00:00
rados: naming conventions: fixes in Unlock function
Fix up variable names that don't meet Go standards. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
e7cdc8fa68
commit
396e8f32ff
@ -526,22 +526,22 @@ func (ioctx *IOContext) LockShared(oid, name, cookie, tag, desc string, duration
|
|||||||
|
|
||||||
// Unlock releases a shared or exclusive lock on an object.
|
// Unlock releases a shared or exclusive lock on an object.
|
||||||
func (ioctx *IOContext) Unlock(oid, name, cookie string) (int, error) {
|
func (ioctx *IOContext) Unlock(oid, name, cookie string) (int, error) {
|
||||||
c_oid := C.CString(oid)
|
coid := C.CString(oid)
|
||||||
c_name := C.CString(name)
|
cName := C.CString(name)
|
||||||
c_cookie := C.CString(cookie)
|
cCookie := C.CString(cookie)
|
||||||
|
|
||||||
defer C.free(unsafe.Pointer(c_oid))
|
defer C.free(unsafe.Pointer(coid))
|
||||||
defer C.free(unsafe.Pointer(c_name))
|
defer C.free(unsafe.Pointer(cName))
|
||||||
defer C.free(unsafe.Pointer(c_cookie))
|
defer C.free(unsafe.Pointer(cCookie))
|
||||||
|
|
||||||
// 0 on success, negative error code on failure
|
// 0 on success, negative error code on failure
|
||||||
// -ENOENT if the lock is not held by the specified (client, cookie) pair
|
// -ENOENT if the lock is not held by the specified (client, cookie) pair
|
||||||
|
|
||||||
ret := C.rados_unlock(
|
ret := C.rados_unlock(
|
||||||
ioctx.ioctx,
|
ioctx.ioctx,
|
||||||
c_oid,
|
coid,
|
||||||
c_name,
|
cName,
|
||||||
c_cookie)
|
cCookie)
|
||||||
|
|
||||||
switch ret {
|
switch ret {
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user