Skip to content

Commit

Permalink
Avoid giving string literals a name
Browse files Browse the repository at this point in the history
  • Loading branch information
geofft committed Feb 8, 2015
1 parent d9d23e1 commit 9d28020
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ extern fn builtin_lulz(args: *mut bash::word_list) -> libc::c_int {
0
}

static NAME: [i8; 5] = ['l' as i8, 'u' as i8, 'l' as i8, 'z' as i8, 0 as i8];

#[no_mangle]
pub static mut lulz_struct: bash::builtin = bash::builtin {
name: &NAME as *const i8,
name: &['l' as i8, 'u' as i8, 'l' as i8, 'z' as i8, 0 as i8] as *const i8,
function: builtin_lulz,
flags: bash::BUILTIN_ENABLED,
long_doc: 0 as *const *const i8,
short_doc: &NAME as *const i8,
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,
handle: 0 as *const i8,
};

0 comments on commit 9d28020

Please # to comment.