Skip to content

Commit

Permalink
Use ssize_t for text length
Browse files Browse the repository at this point in the history
This avoids some mixing of types.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Mar 29, 2017
1 parent aa9ac26 commit f0e4a3b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gammu/gammu.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,8 @@ static void RunBatch(int argc, char *argv[])
* @todo Allocate memory dynamically.
*/
char ln[2000], token;
size_t i, len;
ssize_t pos;
int j, c = 0, argsc, n;
ssize_t pos, i, len, j;
int c = 0, argsc, n;
char *argsv[20];
gboolean origbatch;
char *name;
Expand Down Expand Up @@ -808,9 +807,10 @@ void HelpGeneral(void)
printf("\n");
}

void HelpSplit(int cols, int len, const char *buff)
void HelpSplit(int cols, ssize_t len, const char *buff)
{
int l, len2, pos, split;
int l, pos, split;
ssize_t len2;
gboolean in_opt, first = TRUE;
const char *remain;
char spaces[50], buffer[500];
Expand Down

0 comments on commit f0e4a3b

Please sign in to comment.