Jump to content

    
Sign in to follow this  
Dubov

корявое отображение имени устройства

Recommended Posts

пишу в драйвере для устройтсва

...

static const char *timer_pdata[] = {

"0", /* 0 is the name of the timer */

NULL,

};

 

получаю в консоли после зборки:

 

... cat name

timerЭю

 

совершенно неожиданный результат)

почему?

Edited by Dubov

Share this post


Link to post
Share on other sites

Может я чего то не понял, но

timer_pdata[] - имя массива само по себе указатель, а так как строка неопределённой длины должна оканчиваться нулём static const char timer_pdata[] {" "0", /* 0 is the name of the timer */ ",NULL}

Edited by Boom-Zoom

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this