Skip to content

Commit

Permalink
rbd: fix a pair of erroneous comments
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
phlogistonjohn committed Jan 22, 2025
1 parent d197e7f commit 795b40e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rbd/encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (opts EncryptionOptionsLUKS1) allocateEncryptionOptions() cEncryptionData {
var cOpts C.rbd_encryption_luks1_format_options_t
var retData cEncryptionData
cOpts.alg = C.rbd_encryption_algorithm_t(opts.Alg)
//CBytes allocates memory which we'll free by calling cOptsFree()
// CBytes allocates memory. it will be freed when cEncryptionData.free is called
cOpts.passphrase = (*C.char)(C.CBytes(opts.Passphrase))
cOpts.passphrase_size = C.size_t(len(opts.Passphrase))
retData.opts = C.rbd_encryption_options_t(&cOpts)
Expand All @@ -78,7 +78,7 @@ func (opts EncryptionOptionsLUKS2) allocateEncryptionOptions() cEncryptionData {
var cOpts C.rbd_encryption_luks2_format_options_t
var retData cEncryptionData
cOpts.alg = C.rbd_encryption_algorithm_t(opts.Alg)
//CBytes allocates memory which we'll free by calling cOptsFree()
// CBytes allocates memory. it will be freed when cEncryptionData.free is called
cOpts.passphrase = (*C.char)(C.CBytes(opts.Passphrase))
cOpts.passphrase_size = C.size_t(len(opts.Passphrase))
retData.opts = C.rbd_encryption_options_t(&cOpts)
Expand Down

0 comments on commit 795b40e

Please sign in to comment.