ppp icon indicating copy to clipboard operation
ppp copied to clipboard

Prefer size_t over int where possible

Open AZero13 opened this issue 2 years ago • 14 comments

This avoids needless truncation, which takes up multiple more instructions on some architectures, especially older ones.

AZero13 avatar Apr 19 '23 19:04 AZero13

These fixes look mostly good. Though, some cases the refactoring changes the structure ... Comments inline to for @paulusmack to review.

enaess avatar Apr 23 '23 18:04 enaess

I have mixed feelings about these changes. It's reasonable to use size_t for things that are the length of a structure or a string, but I don't think that the savings in code size will be significant either in space or time. There's also a lot of changes spread out across the source tree which could be better as separate commits.

paulusmack avatar May 01 '23 04:05 paulusmack

I have mixed feelings about these changes. It's reasonable to use size_t for things that are the length of a structure or a string, but I don't think that the savings in code size will be significant either in space or time. There's also a lot of changes spread out across the source tree which could be better as separate commits.

I think they would be best done at once, that's why, since they all have the same theme.

AZero13 avatar May 06 '23 16:05 AZero13

@AtariDreams: It is not possible to separate?

Neustradamus avatar Jun 17 '23 10:06 Neustradamus

@AtariDreams: What is the solution?

Neustradamus avatar Jul 30 '23 14:07 Neustradamus

I notice also that the signoff is a noreply.github.com address, which I don't consider adequate.

paulusmack avatar Aug 03 '23 07:08 paulusmack

@AtariDreams: Have you seen the @paulusmack comment? What is the situation with your signoff?

Neustradamus avatar Aug 24 '23 03:08 Neustradamus

@Neustradamus Fixed!

AZero13 avatar Dec 21 '23 21:12 AZero13

@AtariDreams: Have you seen @paulusmack comments started:

  • https://github.com/ppp-project/ppp/pull/415#pullrequestreview-1795621594

Note: The other PR has been merged :)

Neustradamus avatar Dec 27 '23 16:12 Neustradamus

@AtariDreams: Have you looked comments from @paulusmack?

Neustradamus avatar Apr 26 '24 09:04 Neustradamus

I'll take a look.

AZero13 avatar Apr 26 '24 10:04 AZero13

@AtariDreams: Have you looked? It will be good to have a solution before 2.5.1 release...

Neustradamus avatar May 16 '24 11:05 Neustradamus

As far as I can see, there is no functional change here (or at least, none intended), so I am not going to wait for this.

paulusmack avatar May 18 '24 00:05 paulusmack

@paulusmack: Have you seen the @AtariDreams changes?

Neustradamus avatar Jul 27 '24 10:07 Neustradamus