Do not duplicate the 'smbprofile_active()' and 'snum < 0' logic in two
places; use it only in lookup local helper.
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
{
struct profile_stats_persvc *persvc = NULL;
- if (!smbprofile_active() || (snum < 0)) {
- return NULL;
- }
-
persvc = smbprofile_persvc_lookup(snum);
if (persvc == NULL) {
return NULL;