summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2022-01-02 00:00:09 -0600
committerCraig Small <csmall@dropbear.xyz>2022-01-07 19:19:15 +1100
commit915b07f4ff72e1c9cf2e239124185b7207705d54 (patch)
tree2d9a5e4d4f79564e44272a5d2baeeb3521a0ea0b /proc
parentafdd4690fc3dfa6b5b89ec7795870d8becf416ba (diff)
downloadprocps-ng-915b07f4ff72e1c9cf2e239124185b7207705d54.tar.gz
library: eliminate those warnings for '-Wpointer-sign'
Signed-off-by: Jim Warner <james.warner@comcast.net>
Diffstat (limited to 'proc')
-rw-r--r--proc/escape.c8
-rw-r--r--proc/escape.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/proc/escape.c b/proc/escape.c
index 834602c..cab6286 100644
--- a/proc/escape.c
+++ b/proc/escape.c
@@ -90,7 +90,7 @@ static inline void esc_ctl (unsigned char *str, int len) {
}
}
-int escape_str (unsigned char *dst, const unsigned char *src, int bufsize) {
+int escape_str (char *dst, const char *src, int bufsize) {
static __thread int utf_sw = 0;
int n;
@@ -106,13 +106,13 @@ int escape_str (unsigned char *dst, const unsigned char *src, int bufsize) {
}
if (n >= bufsize) n = bufsize-1;
if (utf_sw < 0)
- esc_all(dst);
+ esc_all((unsigned char *)dst);
else
- esc_ctl(dst, n);
+ esc_ctl((unsigned char *)dst, n);
return n;
}
-int escape_command (unsigned char *outbuf, const proc_t *pp, int bytes, unsigned flags) {
+int escape_command (char *outbuf, const proc_t *pp, int bytes, unsigned flags) {
int overhead = 0;
int end = 0;
diff --git a/proc/escape.h b/proc/escape.h
index 8ae5f81..70dd81c 100644
--- a/proc/escape.h
+++ b/proc/escape.h
@@ -26,8 +26,8 @@
#define ESC_BRACKETS 0x2 // if using cmd, put '[' and ']' around it
#define ESC_DEFUNCT 0x4 // mark zombies with " <defunct>"
-int escape_command (unsigned char *outbuf, const proc_t *pp, int bytes, unsigned flags);
+int escape_command (char *outbuf, const proc_t *pp, int bytes, unsigned flags);
-int escape_str (unsigned char *dst, const unsigned char *src, int bufsize);
+int escape_str (char *dst, const char *src, int bufsize);
#endif