From 97fd90edae033b9995a3fc4373fe1aa4141abb14 Mon Sep 17 00:00:00 2001 From: fdai7207 Date: Fri, 10 Feb 2023 03:34:57 +0100 Subject: [PATCH] refactoring: removed redundancy in the isValidAdress() function. --- src/createEmployeeAccount.c | 15 +++------------ src/createEmployeeAccount.h | 2 ++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/createEmployeeAccount.c b/src/createEmployeeAccount.c index 39f2bac..edd9262 100644 --- a/src/createEmployeeAccount.c +++ b/src/createEmployeeAccount.c @@ -82,18 +82,15 @@ bool isValidPhoneNumber(char *phoneNumber) bool isValidAdress(char *street,char* city,int houseNumber,int postalCode) { - int lengthMax = 20; - int LengthMin = 3; bool validStreet = true; bool validHouseNumber = true; bool validCity = true; bool validpostalCode = true; - if(strlen(street)>lengthMax || strlen(street)maximalAdressLength || strlen(street)lengthMax || strlen(city)maximalAdressLength || strlen(city)