chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strv: return NULL from strv_free()
[elogind.git]
/
src
/
shared
/
device-nodes.c
diff --git
a/src/shared/device-nodes.c
b/src/shared/device-nodes.c
index 98373750996eb073a91f93ae6893a9e8690bbda9..8751797f547b23ec986a2ee89c50227b8f0c3b08 100644
(file)
--- a/
src/shared/device-nodes.c
+++ b/
src/shared/device-nodes.c
@@
-19,10
+19,7
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
-#include <stdint.h>
-#include <sys/types.h>
#include "device-nodes.h"
#include "utf8.h"
#include "device-nodes.h"
#include "utf8.h"
@@
-41,7
+38,7
@@
int encode_devnode_name(const char *str, char *str_enc, size_t len) {
size_t i, j;
if (str == NULL || str_enc == NULL)
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;
for (i = 0, j = 0; str[i] != '\0'; i++) {
int seqlen;
@@
-70,5
+67,5
@@
int encode_devnode_name(const char *str, char *str_enc, size_t len) {
str_enc[j] = '\0';
return 0;
err:
str_enc[j] = '\0';
return 0;
err:
- return -
1
;
+ return -
EINVAL
;
}
}