From 05b0eb217dbec0d94b3faf064dfef2253fff3393 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 12 Nov 2018 22:37:15 -0500 Subject: Use typedefs uint and byte --- bin/pbd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/pbd.c') diff --git a/bin/pbd.c b/bin/pbd.c index 4ee11fe6..88a4c218 100644 --- a/bin/pbd.c +++ b/bin/pbd.c @@ -27,6 +27,8 @@ #include #include +typedef unsigned char byte; + static void spawn(const char *cmd, const char *arg, int dest, int src) { pid_t pid = fork(); if (pid < 0) err(EX_OSERR, "fork"); @@ -106,7 +108,7 @@ static int pbdClient(char c) { } static void copy(int out, int in) { - char buf[4096]; + byte buf[4096]; ssize_t readSize; while (0 < (readSize = read(in, buf, sizeof(buf)))) { ssize_t writeSize = write(out, buf, readSize); @@ -127,7 +129,7 @@ static int pbpaste(void) { return EX_OK; } -static int open1(char *url) { +static int open1(const char *url) { if (!url) return EX_USAGE; int client = pbdClient('o'); ssize_t size = write(client, url, strlen(url)); -- cgit 1.4.1