Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf2f5d9

Browse files
committed
Don't use 0 as a spelling of NULL.
1 parentd938e8b commitbf2f5d9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/interfaces/libpq/fe-exec.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.148 2003/09/22 00:23:35 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.149 2003/10/02 14:47:44 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2331,12 +2331,15 @@ PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
23312331
}
23322332
buflen=j;/* buflen is the length of the unquoted
23332333
* data */
2334+
2335+
/* Shrink the buffer to be no larger than necessary */
23342336
tmpbuf=realloc(buffer,buflen);
23352337

2338+
/* It would only be a very brain-dead realloc that could fail, but... */
23362339
if (!tmpbuf)
23372340
{
23382341
free(buffer);
2339-
return0;
2342+
returnNULL;
23402343
}
23412344

23422345
*retbuflen=buflen;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp