From 0f3df6ebf391cc9e5a0466e887efeaf00b8ef0fd Mon Sep 17 00:00:00 2001 From: Alexander Kulak Date: Sat, 29 Apr 2017 12:29:40 +0300 Subject: [PATCH] satisfy -Werror=format-security --- src/rp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rp.c b/src/rp.c index 2440078..d9e4d1b 100644 --- a/src/rp.c +++ b/src/rp.c @@ -46,19 +46,18 @@ int rp_startupWintasks() ratpoison_cmd = (char *)malloc(MAXPATHSZ); // we don't free it, hopefully run only once FILE *fp; char *fr; - char *errpr = "can't find ratpoison executable\n"; // search in PATH on startup only, // then execv() for speed if ((fp = popen("which ratpoison", "r"))) { fr = fgets(ratpoison_cmd, MAXPATHSZ, fp); if (fr == NULL) { - fprintf(stderr, errpr); + fprintf(stderr, "can't find ratpoison executable\n"); return 0; } pclose(fp); } if (strlen(ratpoison_cmd) < 2) { - fprintf(stderr, errpr); + fprintf(stderr, "can't find ratpoison executable\n"); return 0; } else { ratpoison_cmd[strcspn(ratpoison_cmd, "\r\n")] = 0;