Re: [PATCH] small setenv/getenv integer type changes

2012-04-24 Thread Kenneth R Westerback
On Tue, Apr 24, 2012 at 06:40:27PM -0400, Mansour Moufid wrote: > On 12-04-24 8:01 AM, Kenneth R Westerback wrote: > >On Tue, Apr 24, 2012 at 01:05:52AM -0400, Mansour Moufid wrote: > >>In getenv.c, the __findenv function is changed to use size_t for its > >>length parameter, and ptrdiff_t for its

Re: [PATCH] small setenv/getenv integer type changes

2012-04-24 Thread Mansour Moufid
On 12-04-24 8:01 AM, Kenneth R Westerback wrote: On Tue, Apr 24, 2012 at 01:05:52AM -0400, Mansour Moufid wrote: In getenv.c, the __findenv function is changed to use size_t for its length parameter, and ptrdiff_t for its offset parameter. The getenv function is modified accordingly. In setenv.

Re: [PATCH] small setenv/getenv integer type changes

2012-04-24 Thread Kenneth R Westerback
On Tue, Apr 24, 2012 at 01:05:52AM -0400, Mansour Moufid wrote: > In getenv.c, the __findenv function is changed to use size_t for its > length parameter, and ptrdiff_t for its offset parameter. > The getenv function is modified accordingly. > > In setenv.c, the setenv function is also modified to

Re: [patch] small setenv/getenv integer type changes

2012-04-23 Thread Mansour Moufid
On 2012-04-24, at 12:30 AM, Philip Guenther wrote: > On Mon, 23 Apr 2012, Mansour Moufid wrote: >> The attached patch makes a few small type changes in the files getenv.c >> and setenv.c. The assumption is that unsigned types (specifically >> size_t) better represent object sizes than signed types

[PATCH] small setenv/getenv integer type changes

2012-04-23 Thread Mansour Moufid
In getenv.c, the __findenv function is changed to use size_t for its length parameter, and ptrdiff_t for its offset parameter. The getenv function is modified accordingly. In setenv.c, the setenv function is also modified to match the changes to __findenv, as well as to use size_t for all variable

Re: [patch] small setenv/getenv integer type changes

2012-04-23 Thread Philip Guenther
On Mon, 23 Apr 2012, Mansour Moufid wrote: > The attached patch makes a few small type changes in the files getenv.c > and setenv.c. The assumption is that unsigned types (specifically > size_t) better represent object sizes than signed types, and that > ptrdiff_t is best for pointer arithmetic.

[patch] small setenv/getenv integer type changes

2012-04-23 Thread Mansour Moufid
Hello, The attached patch makes a few small type changes in the files getenv.c and setenv.c. The assumption is that unsigned types (specifically size_t) better represent object sizes than signed types, and that ptrdiff_t is best for pointer arithmetic. In getenv.c, the __findenv function is chang