Author: fanf
Date: Tue Jan 19 20:35:44 2010
New Revision: 202649
URL: http://svn.freebsd.org/changeset/base/202649

Log:
  Fix portability to 64 bit platforms.
  printf("%.*s",i,s) expects an int not a ptrdiff_t
  
  Thanks to bf1783 (at) googlemail.com for the bug report.

Modified:
  head/usr.bin/unifdef/unifdef.c

Modified: head/usr.bin/unifdef/unifdef.c
==============================================================================
--- head/usr.bin/unifdef/unifdef.c      Tue Jan 19 20:19:52 2010        
(r202648)
+++ head/usr.bin/unifdef/unifdef.c      Tue Jan 19 20:35:44 2010        
(r202649)
@@ -334,7 +334,7 @@ main(int argc, char *argv[])
                        if (dirsep != NULL)
                                snprintf(tempname, sizeof(tempname),
                                    "%.*s/" TEMPLATE,
-                                   dirsep - ofilename, ofilename);
+                                   (int)(dirsep - ofilename), ofilename);
                        else
                                strlcpy(tempname, TEMPLATE, sizeof(tempname));
                        ofd = mkstemp(tempname);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to