summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-01-25 10:30:20 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-01-28 17:42:47 -0500
commit3066d402f6563f971d16f479bfa77ea676c90978 (patch)
tree1b55ab8dd6902cd4a7bc6e75cea45f447a1067d3
parent27a018b94e9e84a65cb0159b6d95e776b959f5d5 (diff)
save a line of code
This mainly just helps keep diff's between eudev and systemd a little more clean, but it does drop one line of duplicate code. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/libudev/libudev-util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index a3e2c5f99e..d3bbd05927 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -324,14 +324,13 @@ size_t util_strpcpy(char **dest, size_t size, const char *src)
if (size > 1)
*dest = mempcpy(*dest, src, size-1);
size = 0;
- *dest[0] = '\0';
} else {
if (len > 0) {
*dest = mempcpy(*dest, src, len);
size -= len;
}
- *dest[0] = '\0';
}
+ *dest[0] = '\0';
return size;
}