diff options
-rw-r--r-- | udev-add.c | 2 | ||||
-rw-r--r-- | udevdb.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/udev-add.c b/udev-add.c index 116ab2b448..05f2aa3e9d 100644 --- a/udev-add.c +++ b/udev-add.c @@ -101,7 +101,7 @@ static int create_node(char *name, char type, int major, int minor, int mode) return retval; } -struct sysfs_class_device *get_class_dev(char *device_name) +static struct sysfs_class_device *get_class_dev(char *device_name) { char sysfs_path[SYSFS_PATH_MAX]; char dev_path[SYSFS_PATH_MAX]; @@ -130,13 +130,13 @@ static struct busdb_record *busdb_fetch(const char *bus, const char *id) data = tdb_fetch(udevdb, key); if (data.dptr == NULL || data.dsize == 0) return NULL; - + rec = (struct busdb_record *)malloc(sizeof(struct busdb_record)); if (rec == NULL) { free(data.dptr); return NULL; } - + memcpy(rec, data.dptr, sizeof(struct busdb_record)); free(data.dptr); |