~ubuntu-branches/ubuntu/oneiric/dpkg/oneiric-proposed

« back to all changes in this revision

Viewing changes to utils/update-alternatives.c

  • Committer: Steve Langasek
  • Date: 2011-03-15 00:11:56 UTC
  • Revision ID: steve.langasek@linaro.org-20110315001156-uyrlgh501d69seku
Merge newer snapshot from Raphael, to keep us in tune with mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
 
247
247
        r = malloc(size);
248
248
        if (!r)
249
 
                error(_("malloc failed (%ld bytes)"), (long)size);
 
249
                error(_("malloc failed (%zu bytes)"), size);
250
250
 
251
251
        return r;
252
252
}
471
471
        for (i = 0; i < count; i++) {
472
472
                subcall(prog_path, "--config", table[i]->d_name, NULL);
473
473
                printf("\n");
 
474
                free(table[i]);
474
475
        }
 
476
        free(table);
475
477
}
476
478
 
477
479
static bool
1897
1899
                errno = 0;
1898
1900
                /* Can't use scanf("%s %s %s") because choice can
1899
1901
                 * contain a space */
1900
 
                name = status = choice = NULL;
1901
1902
                res = fgets(line, sizeof(line), input);
1902
1903
                if (res == NULL && errno) {
1903
1904
                        error(_("while reading %s: %s"), desc, strerror(errno));
2197
2198
 
2198
2199
                free(table[i]);
2199
2200
        }
 
2201
        free(table);
2200
2202
 
2201
2203
        /* Check that caller don't mix links between alternatives and don't mix
2202
2204
         * alternatives between slave/master, and that the various parameters