From 175a434de3cd69f7bfa97fac9ec6f080663a6f9d Mon Sep 17 00:00:00 2001 From: charmlesscoin Date: Sat, 3 Aug 2013 18:06:28 -0400 Subject: removed some magic numbers from line_eval() --- testing/nTox.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'testing') diff --git a/testing/nTox.c b/testing/nTox.c index 52d1bfd1..630c5f8e 100644 --- a/testing/nTox.c +++ b/testing/nTox.c @@ -145,19 +145,19 @@ void line_eval(char *line) int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); char numstring[100]; switch (num) { - case -1: + case FAERR_TOOLONG: sprintf(numstring, "[i] Message is too long."); break; - case -2: + case FAERR_NOMESSAGE: sprintf(numstring, "[i] Please add a message to your request."); break; - case -3: + case FAERR_OWNKEY: sprintf(numstring, "[i] That appears to be your own ID."); break; - case -4: + case FAERR_ALREADYSENT: sprintf(numstring, "[i] Friend request already sent."); break; - case -5: + case FAERR_UNKNOWN: sprintf(numstring, "[i] Undefined error when adding friend."); break; default: -- cgit v1.2.3