summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2015-06-02 14:24:48 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2015-06-02 14:24:48 +0100
commitb326a277743b80dde7e5263a232db8df99149164 (patch)
tree0466cc3f74f383cc240218bda54ff6c87bceeef6
parent0a7261268bcfd225cbd66a3b93a730d69a32f047 (diff)
downloadpsycopg2-b326a277743b80dde7e5263a232db8df99149164.tar.gz
Dropped unneeded constness on the notice message
That's a strdup result, we 0wn it.
-rw-r--r--psycopg/connection.h2
-rw-r--r--psycopg/connection_int.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/psycopg/connection.h b/psycopg/connection.h
index c52abc9..d15c9c6 100644
--- a/psycopg/connection.h
+++ b/psycopg/connection.h
@@ -71,7 +71,7 @@ extern HIDDEN PyTypeObject connectionType;
struct connectionObject_notice {
struct connectionObject_notice *next;
- const char *message;
+ char *message;
};
/* the typedef is forward-declared in psycopg.h */
diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c
index aea2841..8fce908 100644
--- a/psycopg/connection_int.c
+++ b/psycopg/connection_int.c
@@ -154,7 +154,7 @@ conn_notice_clean(connectionObject *self)
while (notice != NULL) {
tmp = notice;
notice = notice->next;
- free((void*)tmp->message);
+ free(tmp->message);
free(tmp);
}