Why `(int)`? Just use `%08lx`.