os: fix a C warning
parent
7b7602a2f9
commit
e399c07a2f
|
@ -99,7 +99,7 @@ pub fn environ() map[string]string {
|
||||||
if isnil(derefed) {
|
if isnil(derefed) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
eline := unsafe { cstring_to_vstring(derefed) }
|
eline := unsafe { cstring_to_vstring(&byte(derefed)) }
|
||||||
eq_index := eline.index_byte(`=`)
|
eq_index := eline.index_byte(`=`)
|
||||||
if eq_index > 0 {
|
if eq_index > 0 {
|
||||||
res[eline[0..eq_index]] = eline[eq_index + 1..]
|
res[eline[0..eq_index]] = eline[eq_index + 1..]
|
||||||
|
|
Loading…
Reference in New Issue