summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-30 15:35:37 +0100
committerLennart Poettering <lennart@poettering.net>2014-10-30 15:35:37 +0100
commitef309a681f4c761503e4cd4cc6884d7d6ef70436 (patch)
treef8f465ddb86dd8c9c65f11b4596aba875f14acc3 /src/udev
parent97768fc5746ea97cb2d3ac6854b4fc7ce1c14f24 (diff)
util: unify how we see srand()
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/cdrom_id/cdrom_id.c2
-rw-r--r--src/udev/scsi_id/scsi_serial.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 7a4b98726c..5fe3fb535b 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -922,7 +922,7 @@ int main(int argc, char *argv[])
goto exit;
}
- srand((unsigned int)getpid());
+ initialize_srand();
for (cnt = 20; cnt > 0; cnt--) {
struct timespec duration;
diff --git a/src/udev/scsi_id/scsi_serial.c b/src/udev/scsi_id/scsi_serial.c
index b3d20a3c2d..9338671591 100644
--- a/src/udev/scsi_id/scsi_serial.c
+++ b/src/udev/scsi_id/scsi_serial.c
@@ -861,7 +861,7 @@ int scsi_get_serial(struct udev *udev,
int retval;
memzero(dev_scsi->serial, len);
- srand((unsigned int)getpid());
+ initialize_srand();
for (cnt = 20; cnt > 0; cnt--) {
struct timespec duration;