/***
This file is part of systemd.
- Copyright 2012 Lennart Poettering
+ Copyright 2008-2011 Kay Sievers
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
-#include <sys/types.h>
#include "device-nodes.h"
#include "utf8.h"
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;
str_enc[j] = '\0';
return 0;
err:
- return -1;
+ return -EINVAL;
}