Project

General

Profile

Bug #7870

libnsl: can not use sizeof on arrays passed as function argument

Added by Toomas Soome almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2017-02-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

../rpc/netname.c:206:44: error: 'sizeof' on array function parameter 'netname' will return size of 'char *' [-Werror=sizeof-array-argument]

Since the netname related functions are assuming the fixed size strings, we just need to use the constant and can not use sizeof.

#1

Updated by Electric Monk almost 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit e1419c48e5d913ef3df4ed3fd63dda38e84ffad1

commit  e1419c48e5d913ef3df4ed3fd63dda38e84ffad1
Author: Toomas Soome <tsoome@me.com>
Date:   2017-02-23T14:49:58.000Z

    7870 libnsl: can not use sizeof on arrays passed as function argument
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Alexander Pyhalov <alp@rsu.ru>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Also available in: Atom PDF