lkml.org 
[lkml]   [2016]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 10/15] md-cluster: Delete an unnecessary variable initialisation in lockres_init()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Sat, 1 Oct 2016 13:07:52 +0200

    The local variable "res" will be set to an appropriate pointer a bit later.
    Thus omit the explicit initialisation at the beginning.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/md/md-cluster.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
    index bec8035..b91b552 100644
    --- a/drivers/md/md-cluster.c
    +++ b/drivers/md/md-cluster.c
    @@ -186,7 +186,7 @@ static int dlm_lock_sync_interruptible(struct dlm_lock_resource *res, int mode,
    static struct dlm_lock_resource *lockres_init(struct mddev *mddev,
    char *name, void (*bastfn)(void *arg, int mode), int with_lvb)
    {
    - struct dlm_lock_resource *res = NULL;
    + struct dlm_lock_resource *res;
    int ret, namelen;
    struct md_cluster_info *cinfo = mddev->cluster_info;

    --
    2.10.0
    \
     
     \ /
      Last update: 2016-10-01 16:55    [W:4.082 / U:0.792 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site