From 9dc2d7f8fef2652b8d8f7ee49a5f63c0d0e1e5a5 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 1 Oct 2008 19:02:50 +0000 Subject: avoid deprecated error strings, part 3 --- vchat-client.c | 2 +- vchat-protocol.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vchat-client.c b/vchat-client.c index 579326a..11c39d3 100755 --- a/vchat-client.c +++ b/vchat-client.c @@ -530,7 +530,7 @@ main (int argc, char **argv) /* attempt connection */ if (!vcconnect (getstroption(CF_SERVERHOST), getstroption(CF_SERVERPORT))) { snprintf (tmpstr, TMPSTRSIZE, "Could not connect to server, %s.", - sys_errlist[errno]); + strerror(errno)); strncpy(errstr,tmpstr,TMPSTRSIZE-2); errstr[TMPSTRSIZE-2] = '\0'; strcat(errstr,"\n"); diff --git a/vchat-protocol.c b/vchat-protocol.c index af06c6a..aefe419 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c @@ -831,7 +831,7 @@ networkinput (void) /* no bytes transferred? raise error message, bail out */ if (bytes < 0) { - snprintf (tmpstr, TMPSTRSIZE, "Receive fails, %s.", sys_errlist[errno]); + snprintf (tmpstr, TMPSTRSIZE, "Receive fails, %s.", strerror(errno)); strncpy(errstr,tmpstr,TMPSTRSIZE-2); errstr[TMPSTRSIZE-2] = '\0'; strcat(errstr,"\n"); -- cgit v1.2.3