Skip to content

informal code review of the libconf branch #18

@clepple

Description

@clepple

Some of the warnings on the clang builders prompted me to take a closer look at the libconf branch.

NutStream::status_t NutFile::putData(const std::string & data) has a comment that there is not a FILE* interface for writing arbitrary data. What about fwrite()?

tempnam() should probably be replaced with mkstemp(). Then you won't need the hard-coded /var/tmp variable. (Some systems implement per-user $TMPDIR variables, which eliminate some corner cases and race conditions.)

This expression won't do bit operations: ss << (packed && 0x000000ff) << ".";

Also, you should consider using the standard inet_?to? functions here, especially for the IPv6 address printer.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions