Silence compile warning on 32bit platform

Signed-off-by: Mark Harvey <markh794@gmail.com>
vtllibrary: Unconditionally log OOM condition

A fatal error should always be logged for analysis.

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: hp_ultrium -> return on NULL check

hp_ultrium_pm.c:229 update_hp_vpd_cx() error: we previously assumed
'vpd_p' could be null (see line 226)

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: smc: non-ANSI function declaration of function 'check_tape_load'

smc.c:932:28: warning: non-ANSI function declaration of function
'check_tape_load'

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: smc: Prevent segfault on unlikely event

smc.c:442 fill_element_descriptor() warn: variable dereferenced
before check 's' (see line 439)

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: smc: buffer overflow on barcode copy

smc.c:993 run_move_command() error: sprintf() copies too much data from 'src->media->barcode': 18 vs 17
smc.c:1133 move_slot2slot() error: sprintf() copies too much data from 'src->media->barcode': 18 vs 17
smc.c:1217 move_drive2slot() error: sprintf() copies too much data from 'src->slot->media->barcode': 18 vs 17

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: ssc: Fix bad test in 'ALLOW OVERWRITE'

ssc.c:367 check_restrictions() warn: variable dereferenced before check 'lu_ssc->OK_2_write' (see line 359)
ssc.c:385 check_restrictions() error: we previously assumed 'lu_ssc->OK_2_write' could be null (see line 367)

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: vtlcart: Removed unneeded if()

vtlcart.c:696 create_tape() warn: if();
vtlcart.c:721 create_tape() warn: if();
vtlcart.c:722 create_tape() warn: if();
vtlcart.c:723 create_tape() warn: if();

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: vtlcart: Correct bitwise test in print_raw_header()

vtlcart.c:1316 print_raw_header() warn: should this be a bitwise op?
vtlcart.c:1316 print_raw_header() warn: should this be a bitwise op?
vtlcart.c:1317 print_raw_header() warn: suspicious bitop condition
vtlcart.c:1320 print_raw_header() warn: should this be a bitwise op?
vtlcart.c:1320 print_raw_header() warn: should this be a bitwise op?
vtlcart.c:1321 print_raw_header() warn: suspicious bitop condition

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: No need to NULL check before free()

vtllib.c:953 process_fifoname() info: redundant null check on lu->fifoname calling free()
vtllibrary.c:1114 init_lu() info: redundant null check on lu->naa calling free()
vtllibrary.c:1154 init_lu() info: redundant null check on smc_slots.state_msg calling free()
vtltape.c:2559 init_lu() info: redundant null check on lu->naa calling free()

Signed-off-by: Mark Harvey <markh794@gmail.com>
smatch: vtltape: Possible memory leak in writeBlock_lzo()

vtltape.c:907 writeBlock_lzo() warn: possible memory leak of 'wrkmem'

Added a test for malloc() failure for wrkmem as well.

Signed-off-by: Mark Harvey <markh794@gmail.com>
micro-optimization - add likely() and unlikely() macros

Description of macros:
http://stackoverflow.com/questions/109710/likely-unlikely-macros-in-the-linux-kernel

No, I've not performed any profiling to see if this would help...

Signed-off-by: Mark Harvey <markh794@gmail.com>
vtlcart: include stddef.h not needed

stddef.h header not required. Removed.

Signed-off-by: Mark Harvey <markh794@gmail.com>
Code style cleanup in mktape.c

Signed-off-by: Mark Harvey <markh794@gmail.com>
dump_messageQ: Used a 'long int' to count cmd line args

No need for a long int. Defining a 'normal' int instead.

Signed-off-by: Mark Harvey <markh794@gmail.com>