mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-10 04:27:51 -05:00
Use struct initializers instead of memset()
This is a bit more type-safe.
This commit is contained in:
parent
4966857f21
commit
7a9f8d8d6b
34 changed files with 134 additions and 113 deletions
|
|
@ -86,8 +86,9 @@ bool wlr_drm_format_set_add(struct wlr_drm_format_set *set, uint32_t format,
|
|||
}
|
||||
|
||||
void wlr_drm_format_init(struct wlr_drm_format *fmt, uint32_t format) {
|
||||
memset(fmt, 0, sizeof(*fmt));
|
||||
fmt->format = format;
|
||||
*fmt = (struct wlr_drm_format){
|
||||
.format = format,
|
||||
};
|
||||
}
|
||||
|
||||
bool wlr_drm_format_has(const struct wlr_drm_format *fmt, uint64_t modifier) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue