Skip to content

Commit c86fed7

Browse files
committed
Fix compilation error
1 parent 7b1f0d4 commit c86fed7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/py_gpio.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,11 @@ static PyObject *py_wait_for_edge(PyObject *self, PyObject *args)
392392
char *channel;
393393
char error[30];
394394

395-
if (!PyArg_ParseTuple(args, "sii", &channel, &edge, &timeout))
396-
timeout = -1
395+
if (!PyArg_ParseTuple(args, "sii", &channel, &edge, &timeout)){
396+
timeout = -1;
397397
if (!PyArg_ParseTuple(args, "si", &channel, &edge))
398398
return NULL;
399+
}
399400

400401
if (get_gpio_number(channel, &gpio))
401402
return NULL;
@@ -422,7 +423,7 @@ static PyObject *py_wait_for_edge(PyObject *self, PyObject *args)
422423
Py_INCREF(Py_None);
423424
return Py_None;
424425
}else if (result == -1){
425-
Py_RETURN_FALSE
426+
Py_RETURN_FALSE;
426427
} else if (result == 2) {
427428
PyErr_SetString(PyExc_RuntimeError, "Edge detection events already enabled for this GPIO channel");
428429
return NULL;

0 commit comments

Comments
 (0)