On Sat, 14 Jul 2007, Andrey Chernov wrote: > On Sat, Jul 14, 2007 at 03:02:41AM +0400, Andrey Chernov wrote: >>>> Sean >>>> 1. http://www.farley.org/freebsd/tmp/setenv/clearenv/patch >>> >>> The wrapper version finally looks OK for me. >> >> BTW, since strlen(value) is common part, you may decrease one >> argument to __setenv() call just passing value and doing >> strlen(value) inside it like before, i.e. >> valueLen = strlen(value); Thank you. > One thing more - this is a user name space pollution because ends up into > common block .global: > +const char CorruptEnvFindMsg[] = "environment corrupt; unable to find > %.*s"; > +const char CorruptEnvValueMsg[] = "environment corrupt; missing value for > %s"; > Better replace with > static const char ... Oops. I thought I had made them static. Fixed. Sean -- scf_at_FreeBSD.orgReceived on Fri Jul 13 2007 - 22:26:27 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:14 UTC