summaryrefslogtreecommitdiff
path: root/src/shared/device-nodes.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-08-14 18:12:43 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-08-14 18:12:43 -0400
commit03070edd5c0f6ae55ed79b9fc1295af39844ff40 (patch)
tree047bc4cd7ebdb01cc4d6aa0bfb111ec5ce73f313 /src/shared/device-nodes.c
parent28744043fbaca39dfc9fd1666a8557fd6d8a690f (diff)
src/shared: import more code cleanups from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/device-nodes.c')
-rw-r--r--src/shared/device-nodes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/device-nodes.c b/src/shared/device-nodes.c
index 5ddcaf042c..e235de83e1 100644
--- a/src/shared/device-nodes.c
+++ b/src/shared/device-nodes.c
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
+#include <stdint.h>
#include <sys/types.h>
#include "device-nodes.h"
@@ -42,7 +42,7 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) {
size_t i, j;
if (str == NULL || str_enc == NULL)
- return -1;
+ return -EINVAL;
for (i = 0, j = 0; str[i] != '\0'; i++) {
int seqlen;
@@ -71,5 +71,5 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) {
str_enc[j] = '\0';
return 0;
err:
- return -1;
+ return -EINVAL;
}