use isspace and isprint directly

This commit is contained in:
Arjan van de Ven
2017-05-05 12:18:42 -07:00
committed by Patrick McCarty
parent 6295f0f4dc
commit e9d29a4e7b
+3 -2
View File
@@ -29,6 +29,7 @@
#include <sys/un.h>
#include <limits.h>
#include <inttypes.h>
#include <ctype.h>
#include "common.h"
#include "configuration.h"
@@ -806,8 +807,8 @@ int payload_is_ascii(char *payload, size_t len)
int ret = 0;
for (i = 0; i < len; i++) {
if (!g_ascii_isprint(payload[i]) &&
!g_ascii_isspace(payload[i])) {
if (!isprint(payload[i]) &&
!isspace(payload[i])) {
ret = -EINVAL;
break;
}