Fix typos and extra declarations in lock_printf