You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2005/06/14 02:29:42 UTC
Re: svn commit: r190535 - /httpd/httpd/trunk/modules/cache/mod_cache.h
/httpd/httpd/trunk/modules/cache/mod_disk_cache.c
pquerna@apache.org wrote:
> @@ -813,7 +813,7 @@
>
> iov[0].iov_base = (void*)&disk_info;
> iov[0].iov_len = sizeof(disk_cache_info_t);
> - iov[1].iov_base = dobj->name;
> + iov[1].iov_base = (void*)dobj->name;
> iov[1].iov_len = disk_info.name_len;
>
> rv = apr_file_writev(dobj->hfd, (const struct iovec *) &iov, 2, &amt);
>
This isn't a problem with your change, since the cast to void * you
added is needed to remove the constness of dobj->name, but why is
&disk_info being cast? Any non-const pointer should automatically be
converted to a void pointer, so that cast can probably be dropped.
-garrett
Re: svn commit: r190535 - /httpd/httpd/trunk/modules/cache/mod_cache.h
/httpd/httpd/trunk/modules/cache/mod_disk_cache.c
Posted by Paul Querna <ch...@force-elite.com>.
Garrett Rooney wrote:
> pquerna@apache.org wrote:
>
>> @@ -813,7 +813,7 @@
>>
>> iov[0].iov_base = (void*)&disk_info;
>> iov[0].iov_len = sizeof(disk_cache_info_t);
>> - iov[1].iov_base = dobj->name;
>> + iov[1].iov_base = (void*)dobj->name;
>> iov[1].iov_len = disk_info.name_len;
>>
>> rv = apr_file_writev(dobj->hfd, (const struct iovec *) &iov, 2,
>> &amt);
>>
>
> This isn't a problem with your change, since the cast to void * you
> added is needed to remove the constness of dobj->name, but why is
> &disk_info being cast? Any non-const pointer should automatically be
> converted to a void pointer, so that cast can probably be dropped.
Why? I don't know, I didn't write that code :)
Fixed in r190547.
Thanks,
-Paul
Re: svn commit: r190535 - /httpd/httpd/trunk/modules/cache/mod_cache.h
/httpd/httpd/trunk/modules/cache/mod_disk_cache.c
Posted by Paul Querna <ch...@corelands.com>.
Garrett Rooney wrote:
> pquerna@apache.org wrote:
>
>> @@ -813,7 +813,7 @@
>>
>> iov[0].iov_base = (void*)&disk_info;
>> iov[0].iov_len = sizeof(disk_cache_info_t);
>> - iov[1].iov_base = dobj->name;
>> + iov[1].iov_base = (void*)dobj->name;
>> iov[1].iov_len = disk_info.name_len;
>>
>> rv = apr_file_writev(dobj->hfd, (const struct iovec *) &iov, 2,
>> &amt);
>>
>
> This isn't a problem with your change, since the cast to void * you
> added is needed to remove the constness of dobj->name, but why is
> &disk_info being cast? Any non-const pointer should automatically be
> converted to a void pointer, so that cast can probably be dropped.
Why? I don't know, I didn't write that code :)
Fixed in r190547.
Thanks,
-Paul