From: krw Date: Fri, 2 May 2014 12:43:10 +0000 (+0000) Subject: 'for (part == 0; ...)' is not the same as 'for(part = 0; ...)'. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=75691760d2cd661d3335442c9e4f032c6e96654b;p=openbsd 'for (part == 0; ...)' is not the same as 'for(part = 0; ...)'. Should fix mysterious crashes when twiddling mount points. Too much Marrakesh sun. Pointed out by Owain G. Ainsworth. Thanks! --- diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index e37d5a432a7..71fd9d006f1 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.284 2014/04/21 08:19:38 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.285 2014/05/02 12:43:10 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -1900,7 +1900,7 @@ mpfree(char **mp) if (mp == NULL) return; - for (part == 0; part < MAXPARTITIONS; part++) + for (part = 0; part < MAXPARTITIONS; part++) free(mp[part]); free(mp);