File powerpc-utils-papr.open-flag.patch of Package powerpc-utils

serv_config.c:1680: warning: the address of 'buffer' will always evaluate as 'true'

---
 cmds/serv_config.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/cmds/serv_config.c
+++ b/cmds/serv_config.c
@@ -1675,10 +1675,11 @@ main(int argc, char *argv[]) {
 		return 2;
 	}
 	rc = fread(buffer, 1, BUF_SIZE, fp);
+	if (rc)
 	buffer[rc-1] = '\0';
 	pclose(fp);
 
-	if (buffer) {
+	if (buffer[0]) {
 		if (strstr(buffer, "ibm,setupcfg"))
 			nvram_setupcfg = 1;
 		if (strstr(buffer, "common"))
openSUSE Build Service is sponsored by