From 3066d402f6563f971d16f479bfa77ea676c90978 Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Fri, 25 Jan 2013 10:30:20 -0500 Subject: 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 --- src/libudev/libudev-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3-54-g00ecf