]> granicus.if.org Git - nethack/commitdiff
Lint for strncpy return value
authorPasi Kallinen <paxed@alt.org>
Tue, 19 Sep 2017 11:12:10 +0000 (14:12 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 19 Sep 2017 11:12:10 +0000 (14:12 +0300)
src/files.c

index 6e21a0636eac31c929a662cfd4b919edf149d39a..8ca16bab2fd436d7a149b4289f6c25c994d958db 100644 (file)
@@ -2760,7 +2760,7 @@ const char *line;
     ced->line_num++;
     ced->origline_shown = FALSE;
     if (line && line[0]) {
-        strncpy(ced->origline, line, sizeof(ced->origline)-1);
+        (void) strncpy(ced->origline, line, sizeof(ced->origline)-1);
         ced->origline[sizeof(ced->origline)-1] = '\0';
     } else
         ced->origline[0] = '\0';