Some more P64 fixes - they all assume we don't have truly gigantic

strings.

svn path=/trunk/; revision=27720
This commit is contained in:
Guy Harris 2009-03-15 02:57:16 +00:00
parent 9ebac2bff6
commit 02c7132ea4
4 changed files with 8 additions and 8 deletions

View File

@ -189,7 +189,7 @@ bytes_from_string(fvalue_t *fv, char *s, LogFunc logfunc _U_)
bytes = g_byte_array_new();
g_byte_array_append(bytes, (guint8 *)s, strlen(s));
g_byte_array_append(bytes, (guint8 *)s, (guint)strlen(s));
/* Free up the old value, if we have one */
bytes_fvalue_free(fv);

View File

@ -68,7 +68,7 @@ string_repr_len(fvalue_t *fv, ftrepr_t rtype)
switch (rtype) {
case FTREPR_DISPLAY:
return strlen(fv->value.string);
return (int)strlen(fv->value.string);
case FTREPR_DFILTER:
repr_len = 0;
for (p = fv->value.string; (c = *p) != '\0'; p++) {
@ -182,7 +182,7 @@ val_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFu
static guint
len(fvalue_t *fv)
{
return strlen(fv->value.string);
return (guint)strlen(fv->value.string);
}
static void

View File

@ -124,7 +124,7 @@ get_nsecs(char *startp, int *nsecs)
/*
* How many characters are in the string?
*/
ndigits = strlen(startp);
ndigits = (int)strlen(startp);
/*
* If there are N characters in the string, the last of the
@ -319,7 +319,7 @@ absolute_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_)
gchar *rep;
rep = abs_time_to_str(&fv->value.time);
return strlen(rep) + 2; /* 2 for opening and closing quotes */
return (int)strlen(rep) + 2; /* 2 for opening and closing quotes */
}
static void
@ -334,7 +334,7 @@ relative_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_)
gchar *rep;
rep = rel_time_to_secs_str(&fv->value.time);
return strlen(rep);
return (int)strlen(rep);
}
static void

View File

@ -79,9 +79,9 @@ val_from_string(fvalue_t *fv, char *s, LogFunc logfunc _U_)
/* Make a tvbuff from the string. We can drop the
* terminating NUL. */
private_data = g_memdup(s, strlen(s));
private_data = g_memdup(s, (guint)strlen(s));
new_tvb = tvb_new_real_data(private_data,
strlen(s), strlen(s));
(guint)strlen(s), (gint)strlen(s));
/* Let the tvbuff know how to delete the data. */
tvb_set_free_cb(new_tvb, free_tvb_data);