"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mark Jamsek <mark@jamsek.com>
Subject:
diff.git: fix build and sync with got.git
To:
Game of Trees <gameoftrees@openbsd.org>
Date:
Thu, 1 Sep 2022 06:46:42 +1000

Download raw body.

Thread
Two quick fixes:

1. Fix the build I broke with the previous commit that removed ternary
   if extension with missed '\' in wrapped macro!

2. I want to sync the diff.git commit that removed the ternary if
   extension to got.git, but diff_main.c is out-of-sync with got.git so
   I'd rather keep the change history accurate thus this needs syncing
   first.

-----------------------------------------------
commit 3f17c3d58afc3703dadcf8e143d328399c9dd892 (main)
from: Mark Jamsek <mark@jamsek.dev>
date: Wed Aug 31 20:38:05 2022 UTC
 
 sync files from got.git 336075a42a5ae0fa322db734c481d21998e82bb8
 
diff 923dddfce5fca967558e815e2612d707851e2f0a 3f17c3d58afc3703dadcf8e143d328399c9dd892
commit - 923dddfce5fca967558e815e2612d707851e2f0a
commit + 3f17c3d58afc3703dadcf8e143d328399c9dd892
blob - f31fda0d4f1ddf7e3bc6342344086510e3539eb2
blob + c531ad29bc45c650dd4e3dbc4773479aafd7676b
--- lib/diff_main.c
+++ lib/diff_main.c
@@ -350,7 +350,7 @@ diff_state_add_chunk(struct diff_state *state, bool so
 	return diff_state_add_solved_chunk(state, &chunk);
 }
 
-void
+static void
 diff_data_init_root(struct diff_data *d, FILE *f, const uint8_t *data,
     unsigned long long len, int diff_flags)
 {
@@ -501,7 +501,7 @@ diff_algo_none(const struct diff_algo_config *algo_con
 	return DIFF_RC_OK;
 }
 
-int
+static int
 diff_run_algo(const struct diff_algo_config *algo_config,
 	      struct diff_state *state)
 {

-----------------------------------------------
commit 923dddfce5fca967558e815e2612d707851e2f0a
from: Mark Jamsek <mark@jamsek.dev>
date: Wed Aug 31 20:38:05 2022 UTC
 
 fix build broken in previous commit 35eae7fa6b782ae1
 
 line wrapped without continuation character
 
diff 35eae7fa6b782ae1d000183ef2efc4383dfec4cd 923dddfce5fca967558e815e2612d707851e2f0a
commit - 35eae7fa6b782ae1d000183ef2efc4383dfec4cd
commit + 923dddfce5fca967558e815e2612d707851e2f0a
blob - 376ca751ab3e90181519012a124c167c699a1fb9
blob + 453b71cedd7f9b2a173beaa9d2db148724f992e4
--- include/arraylist.h
+++ include/arraylist.h
@@ -65,7 +65,7 @@
 				(ARRAY_LIST).allocated + \
 				((ARRAY_LIST).allocated ? \
 				(ARRAY_LIST).allocated / 2 : \
-				(ARRAY_LIST).alloc_blocksize ?
+				(ARRAY_LIST).alloc_blocksize ? \
 				(ARRAY_LIST).alloc_blocksize : 8), \
 				sizeof(*(ARRAY_LIST).head)); \
 			if ((ARRAY_LIST).p == NULL) { \
@@ -75,7 +75,7 @@
 			(ARRAY_LIST).allocated += \
 				(ARRAY_LIST).allocated ? \
 				(ARRAY_LIST).allocated / 2 : \
-				(ARRAY_LIST).alloc_blocksize ?
+				(ARRAY_LIST).alloc_blocksize ? \
 				(ARRAY_LIST).alloc_blocksize : 8, \
 			(ARRAY_LIST).head = (ARRAY_LIST).p; \
 			(ARRAY_LIST).p = NULL; \


-- 
Mark Jamsek <fnc.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68