[PATCH] dwrite: Remove useless casts to self