|
10 | 10 | * Copyright (c) 2002-2004, PostgreSQL Global Development Group |
11 | 11 | * |
12 | 12 | * IDENTIFICATION |
13 | | - * $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.33 2004/10/25 00:46:40 neilc Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.34 2004/12/03 21:26:31 tgl Exp $ |
14 | 14 | * |
15 | 15 | *------------------------------------------------------------------------- |
16 | 16 | */ |
@@ -296,8 +296,7 @@ StorePreparedStatement(const char *stmt_name, |
296 | 296 |
|
297 | 297 | /* Check for pre-existing entry of same name */ |
298 | 298 | /* See notes in FetchPreparedStatement */ |
299 | | -MemSet(key,0,sizeof(key)); |
300 | | -strncpy(key,stmt_name,sizeof(key)); |
| 299 | +StrNCpy(key,stmt_name,sizeof(key)); |
301 | 300 |
|
302 | 301 | hash_search(prepared_queries,key,HASH_FIND,&found); |
303 | 302 |
|
@@ -370,8 +369,7 @@ FetchPreparedStatement(const char *stmt_name, bool throwError) |
370 | 369 | * the hash package is picky enough that it needs to be |
371 | 370 | * NULL-padded out to the appropriate length to work correctly. |
372 | 371 | */ |
373 | | -MemSet(key,0,sizeof(key)); |
374 | | -strncpy(key,stmt_name,sizeof(key)); |
| 372 | +StrNCpy(key,stmt_name,sizeof(key)); |
375 | 373 |
|
376 | 374 | entry= (PreparedStatement*)hash_search(prepared_queries, |
377 | 375 | key, |
|