Page MenuHomeFreeBSD

m4: Misc style fixes
ClosedPublic

Authored by des on Tue, Mar 10, 12:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 4, 9:54 AM
Unknown Object (File)
Sat, Apr 4, 8:13 AM
Unknown Object (File)
Sat, Apr 4, 7:43 AM
Unknown Object (File)
Sat, Apr 4, 1:27 AM
Unknown Object (File)
Thu, Apr 2, 6:24 AM
Unknown Object (File)
Mon, Mar 23, 5:09 AM
Unknown Object (File)
Sun, Mar 22, 8:18 PM
Unknown Object (File)
Fri, Mar 20, 2:40 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Tue, Mar 10, 12:18 PM
fuz requested changes to this revision.Sun, Mar 15, 3:49 PM
fuz added a subscriber: fuz.

I would get rid of the type changes, as I don't think they actually improve the code. The end_result change is wrong.

usr.bin/m4/expr.c
24

This is an external variable in parser.y, the type int32_t is correct. If at all, it should be adjusted to YYSTYPE after including parser.h.

35

Following style(9).

usr.bin/m4/extern.h
161 ↗(On Diff #173500)

I don't see the point of these type changes.

This revision now requires changes to proceed.Sun, Mar 15, 3:49 PM
fuz requested changes to this revision.Sun, Mar 15, 4:47 PM
fuz added inline comments.
usr.bin/m4/look.c
221

ohash_first takes a pointer to an unsigned int. This change is incorrect.

254

Same here.

usr.bin/m4/parser.y
21 ↗(On Diff #173730)

This change makes it so that the type of an m4 expression is potentially platform dependent. Is this desired?

In particular, m4(1) documents that 32-bit arithmetic is used, so it should really stay int32_t.

This revision now requires changes to proceed.Sun, Mar 15, 4:47 PM
usr.bin/m4/expr.c
35

The first rule is to be consistent, and m4 consistently does not parenthesize its return values.

des marked an inline comment as done.Mon, Mar 16, 8:38 PM
des retitled this revision from m4: Misc type and style fixes to m4: Misc style fixes.Wed, Mar 25, 12:32 AM
fuz added inline comments.
usr.bin/m4/expr.c
35

Fair enough.

This revision is now accepted and ready to land.Wed, Mar 25, 12:34 AM
This revision was automatically updated to reflect the committed changes.