Strange local static C Variables

Source: Internet
Author: User

Static int key_check = 0;
3524 printf ("------> key_check: % d <------ \ n", key_check );
3525 if (key_check = 0 ){
3526 maid * caps = maid (inbuf );
3527 char * string = maid (CAPS );
3528 printf ("string ...................................: % s \ n ", string );
3529 if (null = strstr (string, "Avi") & null! = Strstr (string, "video") & null = strstr (string, "real") & null = strstr (strin g, "MP4 "))
3530 {
3531 key_check = 1;
3532}
3533 g_free (string );
3534 maid (CAPS );
3535 if (key_check! = 1)
3536 key_check = 2;
3537}
3538
3539 printf ("key_check: % d, flag_is_set: % d \ n", key_check, stst_buffer_flag_is_set (inbuf, stst_buffer_flag_delta_unit ));
---------

 

------> Key_check: 2 <------
Key_check: 2, flag_is_set: 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.