}
if (l->ext_offset) {
+ sector_t e_last;
p = self_partition(cxt, l->ext_index);
-
- sector_t e_last = dos_partition_get_start(p)
+ e_last = dos_partition_get_start(p)
+ dos_partition_get_size(p) - 1;
for (i = 4; i < cxt->label->nparts_max; i++) {
for (i = 0; i < cxt->label->nparts_max; i++) {
struct pte *pe = self_pte(cxt, i);
struct dos_partition *p = pe->pt_entry;
- unsigned int psects, pblocks, podd = 0;;
+ unsigned int psects, pblocks, podd = 0;
struct fdisk_parttype *type;
struct tt_line *ln;
char *str;
PyObject *PyObjectResultStr(const char *s)
{
+ PyObject *result;
if (!s)
/* TODO: maybe lie about it and return "":
* which would allow for
* fs.comment += "comment"
return Py_BuildValue("s", ""); */
Py_RETURN_NONE;
- PyObject *result = Py_BuildValue("s", s);
+ result = Py_BuildValue("s", s);
if (!result)
PyErr_SetString(PyExc_RuntimeError, CONSTRUCT_ERR);
return result;
self->iter = mnt_new_iter(MNT_ITER_FORWARD);
if (errcb) {
+ PyObject *tmp;
if (!PyCallable_Check(errcb))
return -1;
- PyObject *tmp = self->errcb;
+ tmp = self->errcb;
Py_INCREF(errcb);
self->errcb = errcb;
Py_XDECREF(tmp);
char *tty;
int ch, verbose = FALSE;
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
- atexit(close_stdout);
-
static const struct option longopts[] = {
{ "verbose", no_argument, 0, 'v' },
{ "version", no_argument, 0, 'V' },
{ NULL, 0, 0, 0 }
};
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+ atexit(close_stdout);
+
while ((ch = getopt_long(argc, argv, "vVh", longopts, NULL)) != -1)
switch (ch) {
case 'v':