Skip to content

Commit

Permalink
zero out spi structure before use
Browse files Browse the repository at this point in the history
fixes issue #1
  • Loading branch information
lehenbauer committed Sep 11, 2016
1 parent a7e224d commit 6c61629
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generic/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ tclspi_spiObjectObjCmd(ClientData cData, Tcl_Interp *interp, int objc, Tcl_Obj *
int ret;
int length;

// zero out the spi structure
memset (&spi, 0, sizeof(spi));

// obj transfer data delay
if (objc != 4) {
Tcl_WrongNumArgs (interp, 2, objv, "writeData delayUsecs");
Expand Down

0 comments on commit 6c61629

Please sign in to comment.