mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
Merge remote-tracking branch 'gvdb/master' into update-gvdb
This is the result of `git merge gvdb/master`.
This commit is contained in:
commit
0d3473d3bb
@ -206,7 +206,7 @@ item_to_index (GvdbItem *item)
|
|||||||
if (item != NULL)
|
if (item != NULL)
|
||||||
return item->assigned_index;
|
return item->assigned_index;
|
||||||
|
|
||||||
return guint32_to_le (-1u);
|
return guint32_to_le ((guint32) -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -234,7 +234,7 @@ file_builder_allocate (FileBuilder *fb,
|
|||||||
if (size == 0)
|
if (size == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
fb->offset += (-fb->offset) & (alignment - 1);
|
fb->offset += (guint64) (-fb->offset) & (alignment - 1);
|
||||||
chunk = g_slice_new (FileChunk);
|
chunk = g_slice_new (FileChunk);
|
||||||
chunk->offset = fb->offset;
|
chunk->offset = fb->offset;
|
||||||
chunk->size = size;
|
chunk->size = size;
|
||||||
@ -463,9 +463,11 @@ static GString *
|
|||||||
file_builder_serialise (FileBuilder *fb,
|
file_builder_serialise (FileBuilder *fb,
|
||||||
struct gvdb_pointer root)
|
struct gvdb_pointer root)
|
||||||
{
|
{
|
||||||
struct gvdb_header header = { { 0, }, };
|
struct gvdb_header header;
|
||||||
GString *result;
|
GString *result;
|
||||||
|
|
||||||
|
memset (&header, 0, sizeof (header));
|
||||||
|
|
||||||
if (fb->byteswap)
|
if (fb->byteswap)
|
||||||
{
|
{
|
||||||
header.signature[0] = GVDB_SWAPPED_SIGNATURE0;
|
header.signature[0] = GVDB_SWAPPED_SIGNATURE0;
|
||||||
|
@ -379,7 +379,7 @@ gvdb_table_get_names (GvdbTable *table,
|
|||||||
* a pass that fills in no additional items.
|
* a pass that fills in no additional items.
|
||||||
*
|
*
|
||||||
* This takes an O(n) algorithm and turns it into O(n*m) where m is
|
* This takes an O(n) algorithm and turns it into O(n*m) where m is
|
||||||
* the depth of the tree, but in all sane cases the tree won't be very
|
* the depth of the tree, but typically the tree won't be very
|
||||||
* deep and the constant factor of this algorithm is lower (and the
|
* deep and the constant factor of this algorithm is lower (and the
|
||||||
* complexity of coding it, as well).
|
* complexity of coding it, as well).
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user