Skip to content

Commit 9d28020

Browse files
committed
Avoid giving string literals a name
1 parent d9d23e1 commit 9d28020

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ extern fn builtin_lulz(args: *mut bash::word_list) -> libc::c_int {
66
0
77
}
88

9-
static NAME: [i8; 5] = ['l' as i8, 'u' as i8, 'l' as i8, 'z' as i8, 0 as i8];
10-
119
#[no_mangle]
1210
pub static mut lulz_struct: bash::builtin = bash::builtin {
13-
name: &NAME as *const i8,
11+
name: &['l' as i8, 'u' as i8, 'l' as i8, 'z' as i8, 0 as i8] as *const i8,
1412
function: builtin_lulz,
1513
flags: bash::BUILTIN_ENABLED,
1614
long_doc: 0 as *const *const i8,
17-
short_doc: &NAME as *const i8,
15+
short_doc: &['l' as i8, 'o' as i8, 'l' as i8, 'w' as i8, 'u' as i8, 't' as i8, 0 as i8] as *const i8,
1816
handle: 0 as *const i8,
1917
};

0 commit comments

Comments
 (0)