Removed unnecessary code

This commit is contained in:
Andrew Murray 2023-01-31 22:24:52 +11:00
parent 4bb50b1fa7
commit 04e8a9b3e7
2 changed files with 3 additions and 5 deletions

View File

@ -1214,7 +1214,7 @@ PyImaging_Jpeg2KEncoderNew(PyObject *self, PyObject *args) {
char mct = 0;
int sgnd = 0;
Py_ssize_t fd = -1;
char * comment = NULL;
char *comment = NULL;
int add_plt = 0;
if (!PyArg_ParseTuple(
@ -1326,7 +1326,7 @@ PyImaging_Jpeg2KEncoderNew(PyObject *self, PyObject *args) {
PyExc_ValueError,
"JPEG 2000 comment is too long");
Py_DECREF(encoder);
return NULL;
return NULL;
}
context->comment = strdup(comment);
@ -1338,8 +1338,6 @@ PyImaging_Jpeg2KEncoderNew(PyObject *self, PyObject *args) {
Py_DECREF(encoder);
return NULL;
}
} else {
context->comment = NULL;
}
if (quality_layers && PySequence_Check(quality_layers)) {

View File

@ -98,7 +98,7 @@ typedef struct {
const char *error_msg;
/* Custom comment */
char * comment;
char *comment;
/* Include PLT marker segment */
int add_plt;