mirror of
https://github.com/clearlinux/telemetrics-client.git
synced 2026-09-01 11:15:51 +00:00
use isspace and isprint directly
This commit is contained in:
committed by
Patrick McCarty
parent
6295f0f4dc
commit
e9d29a4e7b
+3
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user