diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-12-13 02:50:20 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-12-13 02:50:20 +0000 |
commit | ecdf95f6d606e122fa47dea66582729cba2da5c8 (patch) | |
tree | e63d9626433f9dddcca3beed2c495ab8059a1b7a /src | |
parent | 5c431eb1f220ad9c22b5a8a38a33031ad442b3c7 (diff) | |
download | postgresql-ecdf95f6d606e122fa47dea66582729cba2da5c8.tar.gz postgresql-ecdf95f6d606e122fa47dea66582729cba2da5c8.zip |
This patch fixes the undefined (according to C) and erroneous (under
Digital Uni x with both DEC cc and gcc) behaviour of modifying an
lvalue on the left side an d then using it on the right side of an
assignment. Since this code modifies the
dbname parameter, it was changing, for example, "dbname=template1"
into "dbname =emplate1".
David Smith Programmer P
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/perl5/Pg.xs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/interfaces/perl5/Pg.xs b/src/interfaces/perl5/Pg.xs index 5d8777dae8c..31df6a250ab 100644 --- a/src/interfaces/perl5/Pg.xs +++ b/src/interfaces/perl5/Pg.xs @@ -1,6 +1,6 @@ /*------------------------------------------------------- * - * $Id: Pg.xs,v 1.9 1998/09/27 19:12:23 mergl Exp $ + * $Id: Pg.xs,v 1.10 1998/12/13 02:50:20 momjian Exp $ * * Copyright (c) 1997, 1998 Edmund Mergl * @@ -215,7 +215,8 @@ PQconnectdb(conninfo) } } else { while (*ptr && *ptr != ' ' && *ptr != '\t') { - *ptr++ = tolower(*ptr); + *ptr = tolower(*ptr); + ptr++; } } } @@ -732,7 +733,8 @@ connectdb(conninfo) } } else { while (*ptr && *ptr != ' ' && *ptr != '\t') { - *ptr++ = tolower(*ptr); + *ptr = tolower(*ptr); + ptr++; } } } |