[readdir] constify ->actor
[firefly-linux-kernel-4.4.55.git] / arch / alpha / kernel / osf_sys.c
index ac19c7299d8e1ed2a32edd9f86bec10ab0d1b313..1402fcc11c2c0443d18d59e21192f5af50ecb1c2 100644 (file)
@@ -147,17 +147,16 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd,
 {
        int error;
        struct fd arg = fdget(fd);
-       struct osf_dirent_callback buf;
+       struct osf_dirent_callback buf = {
+               .ctx.actor = osf_filldir,
+               .dirent = dirent,
+               .basep = basep,
+               .count = count
+       };
 
        if (!arg.file)
                return -EBADF;
 
-       buf.dirent = dirent;
-       buf.basep = basep;
-       buf.count = count;
-       buf.error = 0;
-       buf.ctx.actor = osf_filldir;
-
        error = iterate_dir(arg.file, &buf.ctx);
        if (error >= 0)
                error = buf.error;