diff options
Diffstat (limited to 'src/libwpactrl/wpactrl_env_parse.c')
-rw-r--r-- | src/libwpactrl/wpactrl_env_parse.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libwpactrl/wpactrl_env_parse.c b/src/libwpactrl/wpactrl_env_parse.c new file mode 100644 index 0000000..c722fd5 --- /dev/null +++ b/src/libwpactrl/wpactrl_env_parse.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include <bcnm/wpactrl.h> + +unsigned int wpactrl_env_parse (char *s, size_t len) +{ + size_t i = 0 ; + unsigned int n = 0 ; + for (; i < len ; i++) if (s[i] == '\n') (s[i] = 0, n++) ; + return n ; +} |