Еще одна интересная ситуация:
char * myString = malloc(sizeof(char)*STRING_BUFFER_SIZE);
char * yourString = myString;
if (myString)
{
free(myString);
myString = NULL;
}
// Now this one is safe, because we keep to the rule for
// setting pointers to NULL after deletion ...
if (myString)
{
free(myString);
myString = NULL;
}
// But what about this one:
if (yourString)
{
free(yourString);
yourString = NULL;
}
//?!? :)
You should try:
var new_width = $('#book_table').width() + 407;
$('body').width(new_width);
Using css('width')
is returning a string with the 'px' extension rather than simply a number. Firefox can properly parse "100px"
to be 100
with parseInt
, but it looks like IE does not.
Using width()
will just return an integer, which also removes the need to call parseInt
.