comparison dbutil.c @ 1558:2f64cb3d3007 fuzz

- #if not #ifdef for DROPBEAR_FUZZ - fix some unused variables
author Matt Johnston <matt@ucc.asn.au>
date Wed, 28 Feb 2018 21:40:08 +0800
parents 5916af64acd4
children 92c93b4a3646
comparison
equal deleted inserted replaced
1557:61a793b6e471 1558:2f64cb3d3007
118 118
119 snprintf(fmtbuf, sizeof(fmtbuf), "Exited: %s", format); 119 snprintf(fmtbuf, sizeof(fmtbuf), "Exited: %s", format);
120 120
121 _dropbear_log(LOG_INFO, fmtbuf, param); 121 _dropbear_log(LOG_INFO, fmtbuf, param);
122 122
123 #ifdef DROPBEAR_FUZZ 123 #if DROPBEAR_FUZZ
124 // longjmp before cleaning up svr_opts 124 // longjmp before cleaning up svr_opts
125 if (fuzz.do_jmp) { 125 if (fuzz.do_jmp) {
126 longjmp(fuzz.jmp, 1); 126 longjmp(fuzz.jmp, 1);
127 } 127 }
128 #endif 128 #endif
530 530
531 void setnonblocking(int fd) { 531 void setnonblocking(int fd) {
532 532
533 TRACE(("setnonblocking: %d", fd)) 533 TRACE(("setnonblocking: %d", fd))
534 534
535 #ifdef DROPBEAR_FUZZ 535 #if DROPBEAR_FUZZ
536 if (fuzz.fuzzing) { 536 if (fuzz.fuzzing) {
537 return; 537 return;
538 } 538 }
539 #endif 539 #endif
540 540
627 return -1; 627 return -1;
628 } 628 }
629 #endif 629 #endif
630 630
631 time_t monotonic_now() { 631 time_t monotonic_now() {
632 #ifdef DROPBEAR_FUZZ 632 #if DROPBEAR_FUZZ
633 if (fuzz.fuzzing) { 633 if (fuzz.fuzzing) {
634 /* time stands still when fuzzing */ 634 /* time stands still when fuzzing */
635 return 5; 635 return 5;
636 } 636 }
637 #endif 637 #endif