[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Coding style question: Are self-fulfilling headers desired? Are u32/u64 or uint32_t/uint64_t preferred?



Hi Lars,

On Wed, Apr 10, 2024 at 05:05:21PM +0200, Lars Rohwedder wrote:
> So my question is: Are patches / Github pull requests welcome or not, to
> clean-up stuff like this?

They would absolutely be welcome. I'll be the first one to admit that
some of the NBD code has grown a lot of hair over the years, and some
cleanup is sorely needed. I just have never gotten around to doing so.

If you're willing to work on that, then that's awesome, and I would love
to see that move forward.

I originally wrote a bit of an explanation of how we got here, but
really that doesn't matter at all; the fact is that there are a number
of inconsistencies, as you rightly point out, and we should resolve
those.

Other spaces in which cleanup could happen are:

- standardization of indentation;
- split up of nbd-server.c into a bunch of more-or-less self-contained
  files rather than the single gigantic monster that it is currently;
- refactoring of the nbdtab parsing function so that stuff is not passed
  in a gazillion of pointers to single variables, but so that instead we
  pass a single struct which has the pointers to the right locations
- ... and probably a few other things that I'm forgetting about right
  now.

I'm not saying you must definitely do that if you don't have the time,
but if you do have that time and willingness to work on this, then
that'd be awesome too.

Thanks,

-- 
     w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}

I will have a Tin-Actinium-Potassium mixture, thanks.


Reply to: