mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/libpq/crypt.h,v 1.30 2004/12/31 22:03:32 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/include/libpq/crypt.h,v 1.31 2005/05/25 21:40:42 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#define MD5_PASSWD_LEN 35
|
||||
|
||||
#define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
|
||||
#define isMD5(passwd) (strncmp(passwd, "md5", 3) == 0 && \
|
||||
strlen(passwd) == MD5_PASSWD_LEN)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user