Skip to content

Commit

Permalink
Fix unconventional spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickinson committed Sep 13, 2022
1 parent 994703e commit 1294440
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Modules/_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ bu_short(_structmodulestate *state, const char *p, const formatdef *f)
} while (--i > 0);
/* Extend sign, avoiding implementation-defined or undefined behaviour. */
x = (x ^ 0x8000U) - 0x8000U;
return PyLong_FromLong(x & 0x8000U ? -1 - (long)(~x): (long)x);
return PyLong_FromLong(x & 0x8000U ? -1 - (long)(~x) : (long)x);
}

static PyObject *
Expand All @@ -836,7 +836,7 @@ bu_int(_structmodulestate *state, const char *p, const formatdef *f)
} while (--i > 0);
/* Extend sign, avoiding implementation-defined or undefined behaviour. */
x = (x ^ 0x80000000U) - 0x80000000U;
return PyLong_FromLong(x & 0x80000000U ? -1 - (long)(~x): (long)x);
return PyLong_FromLong(x & 0x80000000U ? -1 - (long)(~x) : (long)x);
}

static PyObject *
Expand Down Expand Up @@ -866,7 +866,7 @@ bu_longlong(_structmodulestate *state, const char *p, const formatdef *f)
/* Extend sign, avoiding implementation-defined or undefined behaviour. */
x = (x ^ 0x8000000000000000U) - 0x8000000000000000U;
return PyLong_FromLongLong(
x & 0x8000000000000000U ? -1 - (long long)(~x): (long long)x);
x & 0x8000000000000000U ? -1 - (long long)(~x) : (long long)x);
}

static PyObject *
Expand Down Expand Up @@ -1062,7 +1062,7 @@ lu_short(_structmodulestate *state, const char *p, const formatdef *f)
} while (i > 0);
/* Extend sign, avoiding implementation-defined or undefined behaviour. */
x = (x ^ 0x8000U) - 0x8000U;
return PyLong_FromLong(x & 0x8000U ? -1 - (long)(~x): (long)x);
return PyLong_FromLong(x & 0x8000U ? -1 - (long)(~x) : (long)x);
}

static PyObject *
Expand All @@ -1079,7 +1079,7 @@ lu_int(_structmodulestate *state, const char *p, const formatdef *f)
} while (i > 0);
/* Extend sign, avoiding implementation-defined or undefined behaviour. */
x = (x ^ 0x80000000U) - 0x80000000U;
return PyLong_FromLong(x & 0x80000000U ? -1 - (long)(~x): (long)x);
return PyLong_FromLong(x & 0x80000000U ? -1 - (long)(~x) : (long)x);
}

static PyObject *
Expand Down Expand Up @@ -1109,7 +1109,7 @@ lu_longlong(_structmodulestate *state, const char *p, const formatdef *f)
/* Extend sign, avoiding implementation-defined or undefined behaviour. */
x = (x ^ 0x8000000000000000U) - 0x8000000000000000U;
return PyLong_FromLongLong(
x & 0x8000000000000000U ? -1 - (long long)(~x): (long long)x);
x & 0x8000000000000000U ? -1 - (long long)(~x) : (long long)x);
}

static PyObject *
Expand Down

0 comments on commit 1294440

Please sign in to comment.