~ubuntu-branches/ubuntu/vivid/parted/vivid

« back to all changes in this revision

Viewing changes to .pc/fix-loop-labels.patch/libparted/labels/loop.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-07-21 10:23:16 UTC
  • mfrom: (7.2.32 sid)
  • Revision ID: package-import@ubuntu.com-20140721102316-jsyv3yzmbo8vlde5
Tags: 3.1-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    libparted - a library for manipulating disk partitions
3
 
    Copyright (C) 1999-2000, 2007-2010 Free Software Foundation, Inc.
 
3
    Copyright (C) 1999-2000, 2007-2012 Free Software Foundation, Inc.
4
4
 
5
5
    This program is free software; you can redistribute it and/or modify
6
6
    it under the terms of the GNU General Public License as published by
76
76
static PedDisk*
77
77
loop_alloc (const PedDevice* dev)
78
78
{
79
 
        PED_ASSERT (dev != NULL, return 0);
 
79
        PED_ASSERT (dev != NULL);
80
80
 
81
81
        if (dev->length < 256)
82
82
                return NULL;
92
92
static void
93
93
loop_free (PedDisk* disk)
94
94
{
95
 
        PED_ASSERT (disk != NULL, return);
 
95
        PED_ASSERT (disk != NULL);
96
96
 
97
97
        _ped_disk_free (disk);
98
98
}
106
106
        PedPartition*           part;
107
107
        PedConstraint*          constraint_any;
108
108
 
109
 
        PED_ASSERT (disk != NULL, return 0);
 
109
        PED_ASSERT (disk != NULL);
110
110
        dev = disk->dev;
111
111
        constraint_any = ped_constraint_any (dev);
112
112
 
203
203
 
204
204
        result = ped_partition_new (part->disk, part->type, part->fs_type,
205
205
                                    part->geom.start, part->geom.end);
 
206
        if (result == NULL)
 
207
                return NULL;
206
208
        result->num = part->num;
207
209
        return result;
208
210
}