summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-11-24 20:06:22 +0100
committerKay Sievers <kay.sievers@suse.de>2005-11-24 20:06:22 +0100
commit30473427e8c958158750a0ee412315282c25f3ae (patch)
tree0cb97238c87801309a12d4056143410d830d02c0
parent4a924f0a58024258098e03e3a8827acbc26c591e (diff)
merge two consecutive static strlcat's
Thanks for Marco, who noticed it. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r--udev_db.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/udev_db.c b/udev_db.c
index e2b7b4d921..6e9a1187d0 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -43,8 +43,7 @@ static int devpath_to_db_path(const char *devpath, char *filename, size_t len)
/* add location of db files */
strlcpy(filename, udev_root, len);
- strlcat(filename, "/", len);
- start = strlcat(filename, DB_DIR, len);
+ start = strlcat(filename, "/"DB_DIR, len);
end = strlcat(filename, devpath, len);
if (end > len)
end = len;
@@ -210,8 +209,7 @@ int udev_db_lookup_name(const char *name, char *devpath, size_t len)
int found = 0;
strlcpy(dbpath, udev_root, sizeof(dbpath));
- strlcat(dbpath, "/", sizeof(dbpath));
- strlcat(dbpath, DB_DIR, sizeof(dbpath));
+ strlcat(dbpath, "/"DB_DIR, sizeof(dbpath));
dir = opendir(dbpath);
if (dir == NULL) {
err("unable to open udev_db '%s': %s", dbpath, strerror(errno));
@@ -282,8 +280,7 @@ int udev_db_get_all_entries(struct list_head *name_list)
DIR *dir;
strlcpy(dbpath, udev_root, sizeof(dbpath));
- strlcat(dbpath, "/", sizeof(dbpath));
- strlcat(dbpath, DB_DIR, sizeof(dbpath));
+ strlcat(dbpath, "/"DB_DIR, sizeof(dbpath));
dir = opendir(dbpath);
if (dir == NULL) {
err("unable to open udev_db '%s': %s", dbpath, strerror(errno));