diff options
| author | Leandro Augusto Fogolin Pereira <leandro@zorg.(none)> | 2009-01-25 10:06:51 -0200 | 
|---|---|---|
| committer | Leandro Augusto Fogolin Pereira <leandro@zorg.(none)> | 2009-01-25 10:06:51 -0200 | 
| commit | 65e9eae28344212b9ad4a59f536cdd76154401ca (patch) | |
| tree | 4568eae2eefc23175a8ac858d9dc67af4667e51c /hardinfo2 | |
| parent | 7ea31846c1e3174a1fd2c9d0619c220f15016eb4 (diff) | |
Fix compilation warning
Diffstat (limited to 'hardinfo2')
| -rw-r--r-- | hardinfo2/nqueens.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/hardinfo2/nqueens.c b/hardinfo2/nqueens.c index 9d36a82e..838731c4 100644 --- a/hardinfo2/nqueens.c +++ b/hardinfo2/nqueens.c @@ -24,11 +24,13 @@ int nqueens(int y)      int x;      for (x = 0; x < QUEENS; x++) { -	if (safe(row[y - 1] = x, y - 1)) -	    if (y < QUEENS) +	if (safe((row[y - 1] = x), y - 1)) { +	    if (y < QUEENS) {  		nqueens(y + 1); -	    else +	    } else {  	        break; +            } +        }      }      return 0; | 
