lkml.org 
[lkml]   [2013]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/3] vxlan: silence one build warning
From
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 25 Oct 2013 08:41:34 -0700

> I would rather not fix the warning this way since it risks masking
> later bugs if this code ever changes.

But this is suboptimally coded, and is asking for the warning.

Anything returning a pointer by reference is asking for trouble
in my opinion.

The correct thing to do is to make create_v{4,6}_sock() return
the "struct socket *" as an error pointer.

No more ambiguous initializations, no more warnings.


\
 
 \ /
  Last update: 2013-10-28 05:41    [W:0.138 / U:5.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site