[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings
Hello Julien,
чт, 15 лист. 2018 о 22:20 Julien Grall <julien.grall@xxxxxxx> пише:
> Well the code suggested is different from what I intended :). t should
> be set to invalid before the check mfn_valid/get_page. So this needs at
> least 2 checks. 2 places were t != NULL needs to be explained.
Well, I guess checking a pointer in order to avoid null pointer
dereference is pretty self-explaining. Even if it is done twice.
And the code itself would give a clear idea that we do calculate (and
assign) type value only in case a caller provided us a valid pointer.
For sure, I do not insist on a ternary operator usage.
Sincerely,
Andrii Anisov.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|