diff options
author | Ralph Boehme <slow@samba.org> | 2019-09-25 10:18:03 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-10-16 19:25:12 +0000 |
commit | d7a2e7c33907ece55dad26c75b076aba3facc057 (patch) | |
tree | 4f4a35999782cc44afb16031a5660142ecc44df9 | |
parent | 2ef4d9883f4b11098e8666143192840a3b574b30 (diff) | |
download | samba-d7a2e7c33907ece55dad26c75b076aba3facc057.tar.gz |
s3:lib: factor out stream name asserts to helper function
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f9fdb8a2a6b9ad0fbb89a9734e81a8b1f527966f)
-rw-r--r-- | source3/lib/filename_util.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c index 165adb116b5..7b3fab90c46 100644 --- a/source3/lib/filename_util.c +++ b/source3/lib/filename_util.c @@ -239,10 +239,7 @@ struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx, return out; } -/**************************************************************************** - Simple check to determine if the filename is a stream. - ***************************************************************************/ -bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname) +static void assert_valid_stream_smb_fname(const struct smb_filename *smb_fname) { /* stream_name must always be NULL if there is no stream. */ if (smb_fname->stream_name) { @@ -252,6 +249,15 @@ bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname) if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) { SMB_ASSERT(smb_fname->stream_name == NULL); } +} + +/**************************************************************************** + Simple check to determine if the filename is a stream. + ***************************************************************************/ + +bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname) +{ + assert_valid_stream_smb_fname(smb_fname); if (smb_fname->stream_name == NULL) { return false; |