From: rml@tech9.net Date: Mon, 20 Oct 2003 04:55:43 +0000 (-0700) Subject: [PATCH] udev: trivial trivialities X-Git-Tag: 004~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=d7e954a4ef664cd65fbb34cb23ca57dc1bb89ea0;ds=sidebyside [PATCH] udev: trivial trivialities Yah yah, really trivial stuff... - get_class_device() doesn't need to be exported; it should be static - white space cleanup --- diff --git a/udev-add.c b/udev-add.c index 116ab2b44..05f2aa3e9 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]; diff --git a/udevdb.c b/udevdb.c index 05bd72a5d..fa26de46d 100644 --- a/udevdb.c +++ b/udevdb.c @@ -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);