Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/2660/2/src/host/layer23/src/mobile/gsm322.c
File src/host/layer23/src/mobile/gsm322.c:

Line 5150:                      rc += fwrite(buf, 4, 1, fp);
> I'm not sure if addition is a good idea.  Example: First fwrite() returns 3
I relied on the man page:

> On  success,  fread()  and  fwrite() return the number of items read or
> written.  This number equals the number of bytes transferred only  when
> size  is 1.  If an error occurs, or the end of the file is reached, the
> return value is a short item count (or zero).

As we have nmemb = 1 in both cases, fwrite can only return 0 or 1.
Am I wrong?


-- 
To view, visit https://gerrit.osmocom.org/2660
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I74ad6e540c98ab4914e7a2ea725dd23f5a2fd034
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>
Gerrit-HasComments: Yes

Reply via email to