Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167309858
D45078.id138101.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
839 B
Referenced Files
None
Subscribers
None
D45078.id138101.diff
View Options
diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c
--- a/usr.bin/diff/diffreg_new.c
+++ b/usr.bin/diff/diffreg_new.c
@@ -15,10 +15,12 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/param.h>
#include <sys/capsicum.h>
+#ifndef DIFF_NO_MMAP
#include <sys/mman.h>
+#endif
#include <sys/stat.h>
-#include <sys/types.h>
#include <capsicum_helpers.h>
#include <err.h>
@@ -266,10 +268,12 @@
diff_result_free(result);
diff_data_free(&left);
diff_data_free(&right);
+#ifndef DIFF_NO_MMAP
if (str1)
munmap(str1, st1.st_size);
if (str2)
munmap(str2, st2.st_size);
+#endif
fclose(f1);
fclose(f2);
@@ -297,6 +301,8 @@
if (*p == MAP_FAILED)
#endif
*p = NULL; /* fall back on file I/O */
+ if (*p == NULL)
+ setbuffer(f, NULL, MAXBSIZE);
return f;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 21, 8:16 PM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37051353
Default Alt Text
D45078.id138101.diff (839 B)
Attached To
Mode
D45078: diff: Sort headers.
Attached
Detach File
Event Timeline
Log In to Comment