From 9091c930ead4158566055f1db38c206652d42c4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 8 Mar 2017 22:05:01 +0100 Subject: [PATCH] TP 12 exo2: to not handle scanf() return code for now MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TP_12/exo2/exo2.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TP_12/exo2/exo2.c b/TP_12/exo2/exo2.c index 199d299..f8dea49 100644 --- a/TP_12/exo2/exo2.c +++ b/TP_12/exo2/exo2.c @@ -7,11 +7,7 @@ int main() { FILE* fp; printf("Enter the name of the file you wish to see\n"); - int prt = scanf("%s", fname); - /* if (prt != 0) { - perror("Error entering the file name.\n"); - exit(EXIT_FAILURE); - } */ + scanf("%s", fname); fp = fopen(fname, "r"); /* read mode */ if (fp == NULL) { -- 2.34.1