Skip to content

Commit 0ef3da2

Browse files
rbd: fix a pair of erroneous comments
Fix a couple of comments to make them a bit more accurate. They were probably true at one point in the development of the feature but now referred to functions that don't exist. Signed-off-by: John Mulligan <[email protected]>
1 parent 81e82d8 commit 0ef3da2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rbd/encryption.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (opts EncryptionOptionsLUKS1) allocateEncryptionOptions() cEncryptionData {
6464
var cOpts C.rbd_encryption_luks1_format_options_t
6565
var retData cEncryptionData
6666
cOpts.alg = C.rbd_encryption_algorithm_t(opts.Alg)
67-
//CBytes allocates memory which we'll free by calling cOptsFree()
67+
// CBytes allocates memory. it will be freed when cEncryptionData.free is called
6868
cOpts.passphrase = (*C.char)(C.CBytes(opts.Passphrase))
6969
cOpts.passphrase_size = C.size_t(len(opts.Passphrase))
7070
retData.opts = C.rbd_encryption_options_t(&cOpts)
@@ -78,7 +78,7 @@ func (opts EncryptionOptionsLUKS2) allocateEncryptionOptions() cEncryptionData {
7878
var cOpts C.rbd_encryption_luks2_format_options_t
7979
var retData cEncryptionData
8080
cOpts.alg = C.rbd_encryption_algorithm_t(opts.Alg)
81-
//CBytes allocates memory which we'll free by calling cOptsFree()
81+
// CBytes allocates memory. it will be freed when cEncryptionData.free is called
8282
cOpts.passphrase = (*C.char)(C.CBytes(opts.Passphrase))
8383
cOpts.passphrase_size = C.size_t(len(opts.Passphrase))
8484
retData.opts = C.rbd_encryption_options_t(&cOpts)

0 commit comments

Comments
 (0)