On Mon, Jan 04, 2021 at 05:08:22PM -0000, Karl Palsson wrote:
> 
> Daniel Golle <dan...@makrotopia.org> wrote:
> > On Sat, Jan 02, 2021 at 10:01:36PM +0800, yehol...@outlook.com
> > wrote:
> 
> > > -                 chown(p->pw_dir, p->pw_uid, p->pw_gid);
> > > +                 if (chown(p->pw_dir, p->pw_uid, p->pw_gid))
> > > +                         fprintf(stderr, "Failed to change ownership for 
> > > %s\n", p->pw_dir);
> > 
> > Please let's not have a custom error message for cases which
> > practically never occur. If we would really cover all that,
> > around 80% of the size of executables like procd would be error
> > messages. Imho an assertion is the right thing to do here.
> > 
> 
> Do we compile with assertions enabled?

Interesting point actually: I just checked, assertions are compiled
into code unless NDEBUG is defined which we don't. Could be an idea for
tiny targets to do so...

> 
> Sincerely,
> Karl Palsson




_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to