Skip to content

Commit 0b67040

Browse files
committed
Apply fix to both build types
Extend the fix to handle non Build64 builds also. Signed-off-by: Greg Sjaardema <gsjaardema@gmail.com>
1 parent 572b3a2 commit 0b67040

File tree

1 file changed

+5
-5
lines changed
  • packages/seacas/libraries/supes/ext_lib

1 file changed

+5
-5
lines changed

packages/seacas/libraries/supes/ext_lib/exname.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ void exname(FTNINT *iunit, char *name, FTNINT *ln, long int nlen)
7373
#if Build64
7474
//To remove the warning for "snprintf(string, 3, "%02ld", labs(*iunit));" with minimal performance changes
7575
int ret = snprintf(string, 3, "%02ld", labs(*iunit));
76-
if (ret < 0 || ret > 3) {
77-
fprintf(stderr, "SUPES: exname error.");
78-
exit(EXIT_FAILURE);
79-
}
8076
#else
81-
snprintf(string, 3, "%02d", abs(*iunit));
77+
int ret = snprintf(string, 3, "%02d", abs(*iunit));
8278
#endif
79+
if (ret < 0 || ret > 3) {
80+
fprintf(stderr, "SUPES: exname error.");
81+
exit(EXIT_FAILURE);
82+
}
8383

8484
if (*iunit > 0) {
8585
ExtSymbol = FALSE;

0 commit comments

Comments
 (0)