diff options
author | Neil Conway <neilc@samurai.com> | 2005-05-11 01:26:02 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2005-05-11 01:26:02 +0000 |
commit | f38e413b209d33d70b3dbdb6fd799a59e392140c (patch) | |
tree | d3bd5b66472be4c09b2e18c60baae9789178d925 /src/interfaces/libpq/fe-protocol2.c | |
parent | 35e16515080868e87849a6846ab1c36977157154 (diff) | |
download | postgresql-f38e413b209d33d70b3dbdb6fd799a59e392140c.tar.gz postgresql-f38e413b209d33d70b3dbdb6fd799a59e392140c.zip |
Code cleanup: in C89, there is no point casting the first argument to
memset() or MemSet() to a char *. For one, memset()'s first argument is
a void *, and further void * can be implicitly coerced to/from any other
pointer type.
Diffstat (limited to 'src/interfaces/libpq/fe-protocol2.c')
-rw-r--r-- | src/interfaces/libpq/fe-protocol2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index ed1a3ac7ecf..2501ef4a603 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.16 2004/12/31 22:03:50 pgsql Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.17 2005/05/11 01:26:02 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -592,7 +592,7 @@ getRowDescriptions(PGconn *conn) { result->attDescs = (PGresAttDesc *) pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); - MemSet((char *) result->attDescs, 0, nfields * sizeof(PGresAttDesc)); + MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc)); } /* get type info */ @@ -667,7 +667,7 @@ getAnotherTuple(PGconn *conn, bool binary) pqResultAlloc(result, nfields * sizeof(PGresAttValue), TRUE); if (conn->curTuple == NULL) goto outOfMemory; - MemSet((char *) conn->curTuple, 0, nfields * sizeof(PGresAttValue)); + MemSet(conn->curTuple, 0, nfields * sizeof(PGresAttValue)); /* * If it's binary, fix the column format indicators. We assume @@ -1409,7 +1409,7 @@ pqBuildStartupPacket2(PGconn *conn, int *packetlen, if (!startpacket) return NULL; - MemSet((char *) startpacket, 0, sizeof(StartupPacket)); + MemSet(startpacket, 0, sizeof(StartupPacket)); startpacket->protoVersion = htonl(conn->pversion); |