Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:ALP:Source:Standard:Core:0.1
drbd
bsc-1206791-03-drbd-fix-warning-about-initializ...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch of Package drbd
From 1b4b7a945d5191225965d8e79fc6705c1b394e1d Mon Sep 17 00:00:00 2001 From: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon, 10 Oct 2022 09:20:20 +0200 Subject: [PATCH] drbd: fix warning about initializing multiple struct members with one memset() It comes from 6cedeb568b, November 2008 "proto version 89: support checksum based resyn" Modern compiler warns about this and warnings might be treated as errors. --- drbd/drbd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c index 84040ed4bfaf..fe8cf60a85fc 100644 --- a/drbd/drbd_main.c +++ b/drbd/drbd_main.c @@ -1150,7 +1150,8 @@ int drbd_send_sync_param(struct drbd_peer_device *peer_device) return -EIO; /* initialize verify_alg and csums_alg */ - memset(p->verify_alg, 0, 2 * SHARED_SECRET_MAX); + memset(p->verify_alg, 0, sizeof(p->verify_alg)); + memset(p->csums_alg, 0, sizeof(p->csums_alg)); rcu_read_lock(); nc = rcu_dereference(peer_device->connection->transport.net_conf); -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor