Whamcloud - gitweb
LU-1735 ptlrpc: cleanup jobid code
Some cleanups for the jobid code:
- if obd_jobid_var is too large, only print an error message once
- in linux cfs_get_environ():
-- cache strlen(key) since it doesn't change and is used often
-- remove unnecessary typecasts of void pointers
-- use "rc" instead of "ret"
-- balance ENTRY and RETURN/GOTO calls
- add cfs_get_environ() for liblustre and remove inline #ifdef
- use strcmp() to compare strings that are known NUL-terminated
- use strlcpy() to ensure NUL-terminated strings in target buffer
-- add strlcpy() wrapper for liblustre, it isn't in Glibc on RHEL5
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I22c3d5c1755c1d6aab666a769df38218b954cab0
Reviewed-on: http://review.whamcloud.com/3713
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>