[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
This commit is contained in:
parent
fd14ee04ef
commit
d7e954a4ef
|
@ -101,7 +101,7 @@ static int create_node(char *name, char type, int major, int minor, int mode)
|
||||||
return retval;
|
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 sysfs_path[SYSFS_PATH_MAX];
|
||||||
char dev_path[SYSFS_PATH_MAX];
|
char dev_path[SYSFS_PATH_MAX];
|
||||||
|
|
4
udevdb.c
4
udevdb.c
|
@ -130,13 +130,13 @@ static struct busdb_record *busdb_fetch(const char *bus, const char *id)
|
||||||
data = tdb_fetch(udevdb, key);
|
data = tdb_fetch(udevdb, key);
|
||||||
if (data.dptr == NULL || data.dsize == 0)
|
if (data.dptr == NULL || data.dsize == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
rec = (struct busdb_record *)malloc(sizeof(struct busdb_record));
|
rec = (struct busdb_record *)malloc(sizeof(struct busdb_record));
|
||||||
if (rec == NULL) {
|
if (rec == NULL) {
|
||||||
free(data.dptr);
|
free(data.dptr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(rec, data.dptr, sizeof(struct busdb_record));
|
memcpy(rec, data.dptr, sizeof(struct busdb_record));
|
||||||
free(data.dptr);
|
free(data.dptr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue