[PATCH v6 11/16] bisect--helper: calling `bisect_state()` without an argument is a bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Schindelin <johannes.schindelin@xxxxxx>

The `bisect_state()` function is now a purely internal function and must
be called with a valid state, everything else is a bug.

Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
---
 builtin/bisect--helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 05fe619c47c..ac3b2e5b61c 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -997,6 +997,8 @@ static enum bisect_error bisect_state(int argc, const char **argv,
 	struct strbuf buf = STRBUF_INIT;
 	struct oid_array revs = OID_ARRAY_INIT;
 
+	if (!argc)
+		BUG("bisect_state() called without argument");
 
 	if (bisect_autostart(prefix))
 		return BISECT_FAILED;
-- 
gitgitgadget




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux