libsmb: Slightly simplify py_cli_list()
authorVolker Lendecke <vl@samba.org>
Sun, 28 Apr 2024 14:07:44 +0000 (16:07 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 30 Apr 2024 22:44:32 +0000 (22:44 +0000)
We don't need an & to take a function pointer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/pylibsmb.c

index aa87fa0c1a2e06b8a9f61ee803407d0143122c1e..e24f78ee9df26e178210549ec17c2375531900ad 100644 (file)
@@ -2077,7 +2077,7 @@ static PyObject *py_cli_list(struct py_cli_state *self,
        const char *kwlist[] = { "directory", "mask", "attribs",
                                 "info_level", NULL };
        NTSTATUS (*callback_fn)(struct file_info *, const char *, void *) =
-               &list_helper;
+               list_helper;
 
        if (!ParseTupleAndKeywords(args, kwds, "z|sII:list", kwlist,
                                   &base_dir, &user_mask, &attribute,
@@ -2099,7 +2099,7 @@ static PyObject *py_cli_list(struct py_cli_state *self,
        }
 
        if (info_level == SMB2_FIND_POSIX_INFORMATION) {
-               callback_fn = &list_posix_helper;
+               callback_fn = list_posix_helper;
        }
        status = do_listing(self, base_dir, user_mask, attribute,
                            info_level, callback_fn, result);