diff options
-rw-r--r-- | src/libudev/libudev-util.c | 3 |
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; } |