Skip to content

Commit 14018f1

Browse files
authored
os: remove mut declarions for unchanged vars in os_nix.c.v (#21564)
1 parent c9e6a12 commit 14018f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vlib/os/os_nix.c.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn glob_match(dir string, pattern string, next_pattern string, mut matches []str
172172

173173
fn native_glob_pattern(pattern string, mut matches []string) ! {
174174
steps := pattern.split(os.path_separator)
175-
mut cwd := if pattern.starts_with(os.path_separator) { os.path_separator } else { '.' }
175+
cwd := if pattern.starts_with(os.path_separator) { os.path_separator } else { '.' }
176176
mut subdirs := [cwd]
177177
for i := 0; i < steps.len; i++ {
178178
step := steps[i]
@@ -214,7 +214,7 @@ fn native_glob_pattern(pattern string, mut matches []string) ! {
214214
}
215215

216216
pub fn utime(path string, actime int, modtime int) ! {
217-
mut u := C.utimbuf{actime, modtime}
217+
u := C.utimbuf{actime, modtime}
218218
if C.utime(&char(path.str), voidptr(&u)) != 0 {
219219
return error_with_code(posix_get_error_msg(C.errno), C.errno)
220220
}
@@ -257,7 +257,7 @@ pub fn uname() Uname {
257257
pub fn hostname() !string {
258258
mut hstnme := ''
259259
size := 256
260-
mut buf := unsafe { &char(malloc_noscan(size)) }
260+
buf := unsafe { &char(malloc_noscan(size)) }
261261
if C.gethostname(buf, size) == 0 {
262262
hstnme = unsafe { cstring_to_vstring(buf) }
263263
unsafe { free(buf) }

0 commit comments

Comments
 (0)