From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | cleanup: remove MemSet() casts |
Date: | 2005-05-10 06:14:16 |
Message-ID: | 42805138.5010805@samurai.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
There were various locations in the code that were casting the first
argument to MemSet() or occasionally memset() to a char *. This is not
necessary, per C89: memset's first argument is a void * to begin with,
and there is an implicit conversion between void * and any other pointer
type.
I also noticed a bit of unclear / inconsistent code in MemSet() itself:
it's not obvious whether unary * or postfix ++ has higher precedence
(the latter does), so I added some parentheses to make this clear.
Barring any objections, I'll apply this to HEAD tomorrow.
-Neil
Attachment | Content-Type | Size |
---|---|---|
memset_char_ptr_cast_cleanup-2.patch | text/x-patch | 10.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2005-05-10 06:49:28 | Re: cleanup: remove MemSet() casts |
Previous Message | Neil Conway | 2005-05-10 04:14:33 | pgstat: reduce message header |