summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2019-03-31 00:53:27 +0100
committerAmadeusz Sławiński <amade@asmblr.net>2019-03-31 01:07:44 +0100
commit8f688079bebafbf537c6105915b5d396af69dd54 (patch)
tree569b83895711885c13550dcb8715f249bf0304f8
parent8b52d122cb5fde9e01cada91db68ba113ab879db (diff)
downloadscreen-8f688079bebafbf537c6105915b5d396af69dd54.tar.gz
Fix D_processinputdata type
Define d_processinputdata as struct pwdata instead of doing casts back and forth. Removes clang warning with -Wcast-align. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
-rw-r--r--src/display.h2
-rw-r--r--src/socket.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/display.h b/src/display.h
index e09d380..5b1564d 100644
--- a/src/display.h
+++ b/src/display.h
@@ -90,7 +90,7 @@ struct Display {
Canvas *d_forecv; /* current input focus */
Layout *d_layout; /* layout we're using */
void (*d_processinput) (char *, size_t);
- char *d_processinputdata; /* data for processinput */
+ struct pwdata *d_processinputdata; /* data for processinput */
int d_vpxmin, d_vpxmax; /* min/max used position on display */
Window *d_fore; /* pointer to fore window */
Window *d_other; /* pointer to other window */
diff --git a/src/socket.c b/src/socket.c
index e3a66c2..7d9fff5 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -1111,7 +1111,7 @@ static void AskPassword(Message *m)
pwdata->len = 0;
pwdata->m = *m;
- D_processinputdata = (char *)pwdata;
+ D_processinputdata = pwdata;
D_processinput = PasswordProcessInput;
/* if GECOS data is CSV, we only want the text before the first comma */
@@ -1221,7 +1221,7 @@ static void PasswordProcessInput(char *ibuf, size_t ilen)
size_t len;
int pid = D_userpid;
- pwdata = (struct pwdata *)D_processinputdata;
+ pwdata = D_processinputdata;
len = pwdata->len;
while (ilen-- > 0) {
c = *(unsigned char *)ibuf++;