mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-24 02:43:06 +00:00
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
--- rpm-5.4.7/build/files.c.dev_unfuck~ 2012-04-12 22:27:45.086028618 +0200
|
|
+++ rpm-5.4.7/build/files.c 2012-04-12 22:28:34.149103420 +0200
|
|
@@ -1491,10 +1491,7 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
|
|
xx = headerPut(h, he, 0);
|
|
he->append = 0;
|
|
|
|
- /* XXX Hash instead of 64b->16b truncate to prevent aliasing. */
|
|
- { dev_t _dev = flp->fl_rdev;
|
|
- ui16 = (uint16_t)hashFunctionString(0, &_dev, sizeof(_dev));
|
|
- }
|
|
+ ui16 = (rpmuint16_t) flp->fl_rdev;
|
|
he->tag = RPMTAG_FILERDEVS;
|
|
he->t = RPM_UINT16_TYPE;
|
|
he->p.ui16p = &ui16;
|
|
@@ -1503,10 +1500,7 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
|
|
xx = headerPut(h, he, 0);
|
|
he->append = 0;
|
|
|
|
- /* XXX Hash instead of 64b->32b truncate to prevent aliasing. */
|
|
- { dev_t _dev = flp->fl_dev;
|
|
- ui32 = hashFunctionString(0, &_dev, sizeof(_dev));
|
|
- }
|
|
+ ui32 = (rpmuint32_t) flp->fl_dev;
|
|
he->tag = RPMTAG_FILEDEVICES;
|
|
he->t = RPM_UINT32_TYPE;
|
|
he->p.ui32p = &ui32;
|
|
@@ -1515,10 +1509,7 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
|
|
xx = headerPut(h, he, 0);
|
|
he->append = 0;
|
|
|
|
- /* XXX Hash instead of 64b->32b truncate to prevent aliasing. */
|
|
- { ino_t _ino = flp->fl_ino;
|
|
- ui32 = hashFunctionString(0, &_ino, sizeof(_ino));
|
|
- }
|
|
+ ui32 = (rpmuint32_t) flp->fl_ino;
|
|
he->tag = RPMTAG_FILEINODES;
|
|
he->t = RPM_UINT32_TYPE;
|
|
he->p.ui32p = &ui32;
|