summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian1998-12-13 02:50:39 +0000
committerBruce Momjian1998-12-13 02:50:39 +0000
commit4c71609c1c71dd508b1e7c655198be54720dd1ba (patch)
treee79ef7d8c922ca91646a72dcef5a2cfc9979d7f9
parentf1a24505bb9c6781ff712b4826586e92f2bafec6 (diff)
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
-rw-r--r--src/interfaces/perl5/Pg.xs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/interfaces/perl5/Pg.xs b/src/interfaces/perl5/Pg.xs
index 5d8777dae8c..f57f44f3165 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.9.2.1 1998/12/13 02:50:39 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++;
}
}
}