len should be signed
standard memset error

size of pointer instead of object
warning fix
reformat of one function